当关闭子窗口时刷新父窗口 ,窗口打开总最大化
父窗口中有数据列表,当对数据进行修改时弹出一子窗口,对数据进行修改,完毕保存后,当关闭子窗口
时,刷新父窗口数据
实现的javascript:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (this.name!='fullscreen'){
window.open(location.href,'fullscreen','fullscreen,scrollbars')
}
// End -->
时,刷新父窗口数据
实现的javascript:
<script language="javascript">
function closewin()
{
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) //检测窗口关闭事件
{
self.close();
window.opener.location.href=Form1.Hidden1.value; //不能用window.opener.location.reload(),否则会出提示框
}
}
</script> <body bgColor="darkgray" MS_POSITIONING="GridLayout" onbeforeunload="closewin()";>
function closewin()
{
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) //检测窗口关闭事件
{
self.close();
window.opener.location.href=Form1.Hidden1.value; //不能用window.opener.location.reload(),否则会出提示框
}
}
</script> <body bgColor="darkgray" MS_POSITIONING="GridLayout" onbeforeunload="closewin()";>
<script>
var a=screen.width+8;
var b=screen.height-22 ;
window.moveTo(-4,-4)
window.resizeTo(a,b)
</script>
var a=screen.width+8;
var b=screen.height-22 ;
window.moveTo(-4,-4)
window.resizeTo(a,b)
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (this.name!='fullscreen'){
window.open(location.href,'fullscreen','fullscreen,scrollbars')
}
// End -->
<body onload=max.Click()>
<OBJECT id=max type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="Maximize"></OBJECT>
方法二
<script language="Javascript">
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
if (top.frames.length != 0) top.location = self.document.location;
</script>
以上摘自:http://www.jiejingwang.com
如果要全屏显示,就用下面的代码:
把如下代码加入<body>区域中
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (this.name!='fullscreen'){
window.open(location.href,'fullscreen','fullscreen,scrollbars')
}
// End -->
</script>
<a href="JavaScript:window.close(self)">返回正常效果显示</a>
<OBJECT id=max type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="Maximize"></OBJECT>
方法二
<script language="Javascript">
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
if (top.frames.length != 0) top.location = self.document.location;
</script>
以上摘自:http://www.jiejingwang.com
如果要全屏显示,就用下面的代码:
把如下代码加入<body>区域中
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (this.name!='fullscreen'){
window.open(location.href,'fullscreen','fullscreen,scrollbars')
}
// End -->
</script>
<a href="JavaScript:window.close(self)">返回正常效果显示</a>