1.default1.aspx 此页使用框架
<script type="text/javascript">
window.onbeforeunload = function()
{
window.event.returnValue="感谢使用此系统!";
if (!window.event.reason)
{
window.event.cancelBubble = true;
}
else
{return;}
}
</script>
<script type="text/javascript" >
<frameset framespacing="1" Name="Content" id="Content" rows="130,*,21" frameborder="yes" border="1" scrolling="no">
<frame SRC="top.aspx" NAME="top"scrolling="no" id="top" marginwidth="0" marginheight="0">
<frameset Name="EF2K" id="EF2K" cols="165,*" frameborder="no" border="3" scrolling="no">
<frame SRC="menu.aspx" NAME="module" id="module" scrolling="auto" border="1" marginwidth="0" marginheight="0">
<frame SRC="info.aspx" NAME="Right" id="Right" scrolling="auto" border="1" marginwidth="0" marginheight="0">
</frameset>
<frame SRC="bottom.htm" NAME="Down" id="Down" scrolling="no" marginwidth="0" marginheight="0" border="0">
</frameset>
function left()
{
window.location.href("/");
}
</script>
2.top.aspx中有个按钮是退出系统的!
<script type="text/javascript" >
function Q()
{
//window.parent.close();
window.parent.left();
}
</script>
问题:
当调用top.aspx中Q()时default会有提示框出现是否离开!点确定时没有问题,就会自动跳转,但是点取消时就会出现一个未知错误!