/asp.net_postback_javascript.aspx Secret
Last active
June 13, 2016 06:46
asp.net_postback_javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://code.jquery.com/jquery-1.10.2.js"></script> | |
<script type="text/javascript" language="javascript"> | |
//postback,jquery事件會失效 | |
//重新註冊按鈕事件 | |
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); | |
function EndRequestHandler(sender, args) | |
{ | |
initailEvent(); | |
} | |
$(function(){ | |
initailEvent(); | |
}); | |
//重新註冊事件 | |
function initailEvent(){ | |
$('#btnSend').click(function(){ | |
alert('OK'); | |
}); | |
} | |
</script> | |
<input id='btnSend' type='button' value='Send' /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment