Can Iet a function auto run at the end of document?

Please reply at here