How to detect/track postback in javascript?

后端 未结 11 1394
猫巷女王i
猫巷女王i 2020-12-02 18:51

How to detect/track/check postback in javascript(e.g in asp.net Page.isPostBack())? Any suggestion?

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

    You can only keep track of the postback if you are using AJAX requests or have a hidden field of some sort that the javascript reads on page load. Otherwise the page is regenerated and all POST data is lost; as you would expect and hope.

提交回复
热议问题