The intense motion of a ship can greatly impacts the comfort of crew members and the safety of the vessel. Therefore, accurately estimating and predicting ship attitudes has become an important issue. This paper introduces the latest development in functional deep learning model called DeepOnet. It takes wave height as input and ship motion as output, using a cause-to-result prediction approach. The modeling data used in this study is sourced from publicly available experimental data from the Iowa Institute of Hydraulic Research. Firstly, parameters system tuning was conducted for the neural network's hyperparameters to determine the appropriate combination of parameters. Secondly, the DeepOnet model for wave height and multi-degree-of-freedom motion was established, and the influence of increasing time steps on prediction accuracy was examined. Finally, a comparison was made between the DeepOnet model and the classical time series model LSTM. It was found that the DeepOnet model had a 10-fold improvement in accuracy for roll and heave attitudes. Moreover, as the forecast duration increased, the advantage of DeepOnet showed a trend of strengthening. As a functional prediction model, DeepOnet provides a new promising tool for very short-term prediction of ship motion.