我想在java脚本上调用“WebForm.aspx”;
<script type="text/javascript">
window.onbeforeunload = function (e) {
var msg = 'Are you sure?';
e = e || window.event;
if (e)
e.returnValue = msg;
return msg;
}
代码在页面卸载时返回一条消息。我想打开目标网络表单而不是返回消息..
谢谢
任何评论都非常感谢
答案 0 :(得分:0)
我想我已经知道了
<script type="text/javascript">
window.onbeforeunload = function (e) {
var msg = 'Are you sure?';
e = e || window.event;
if (e)
window.showModalDialog('WebForm2.aspx');
}
感谢