[removed] equivalent for Ajax applications?

后端 未结 5 699
情话喂你
情话喂你 2020-12-12 02:01

I\'m using window.onload to call my JavaScript code that has to be executed after the page is fully loaded. From what I read this is the recommended method to call such scri

5条回答
  •  情话喂你
    2020-12-12 02:28

    In addition to the answer from Rasmus Kaj and if you are using jQuery, I would direct you to take a look at Global Ajax Event Handlers.

    • jQuery.fn.ajaxComplete (http://api.jquery.com/ajaxcomplete/)
    • jQuery.fn.ajaxStop (http://api.jquery.com/ajaxstop/)

    Note, that this has nothing to do with the native onload event.

提交回复
热议问题