jQuery document.ready vs pageLoad

后端 未结 6 1831
陌清茗
陌清茗 2021-02-02 11:56

I\'ve picked up an existing project from another developer and ive noticed in the code that they are executing js code within three different event handlers...

f         


        
6条回答
  •  没有蜡笔的小新
    2021-02-02 12:24

    $(document).ready() will not fire for the partial postbacks (happened from AJAX). In that case, you should use MS AJAX pageLoad function when you need to execute something when the page loads either from the full postback or partial.

    The article given in the Encosia site is a good read.

提交回复
热议问题