window.onbeforeunload=function (event)
{
var getFileCont = setOldFileCont(".TabBody","input[type=text],textarea,select","get");
if(oldFileCont !=getFileCont)
{ var evt = event || window.event;
evt.returnValue = "If you leave without saving, all your modifications to this page will be lost. Are you sure you want to continue?";
}
} 此代码会 弹出 两次确认对话框。如果改成只弹出一次的?
{
var getFileCont = setOldFileCont(".TabBody","input[type=text],textarea,select","get");
if(oldFileCont !=getFileCont)
{ var evt = event || window.event;
evt.returnValue = "If you leave without saving, all your modifications to this page will be lost. Are you sure you want to continue?";
}
} 此代码会 弹出 两次确认对话框。如果改成只弹出一次的?
更新下标题 写错了。