I am implementing a jquery dialog which acts as the windows message dialog in asp.net.I want to build a dialog in jquery which should wait until the user send the confirmation and the asp.net code execution should stop unless until I click on the confirmation box with ok and cancel button.How I can implement this dial开发者_运维百科og. I am using the ScriptManager.RegisterStartupScript in the code window in asp.net.I removed the default message confirmation window of asp.net.I want to build the same message window with jquery... Is it possible?
Why can't you use "confirm" function that is part of javascript ?
Look on this example:
...script type="text/javascript"...
function confirmation() {
var answer = confirm("Leave http://stackoverflow.com?")
if (answer){
alert("Bye bye!")
window.location = "http://stackoverflow.com";
}
else{
alert("Thanks for sticking around!")
}
}
.../script...
may be this example helps you.
精彩评论