How to delay calling of javascript function?

后端 未结 5 2065
野性不改
野性不改 2020-11-29 06:09

I\'m new to JavaScript.

I would like to call JavaScript / jQuery function after the page load in aspx page.

I tried using

5条回答
  •  粉色の甜心
    2020-11-29 06:23

    If you're going to be using jQuery then it's preferable to attach an event to the document ready event using one of the following:

    $(document).ready(callback);
    

    or

    $(document).ready(function () { /* do stuff */ });
    

    or

    $(callback);
    

    or

    $(function () { /* do stuff */ });
    

提交回复
热议问题