<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>关闭子窗体</title>
<script type="text/javascript">
var G_hSubWin=null;function popWin(sUrl){
var sCfg="menubar=no,toolbar=no,statusbar=no"
+",left=200,top=200,width=500,height=300"
G_hSubWin=window.open(sUrl,"__PopWin",sCfg);
}window.onunload=function(){
if(G_hSubWin)
G_hSubWin.close();
}
</script>
</head>
<body>
<input type="button" value="打开" onclick="popWin('http://www.baidu.com')"/>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>关闭子窗体</title>
<script type="text/javascript">
var G_hSubWin=null;function popWin(sUrl){
var sCfg="menubar=no,toolbar=no,statusbar=no"
+",left=200,top=200,width=500,height=300"
G_hSubWin=window.open(sUrl,"__PopWin",sCfg);
}window.onunload=function(){
if(G_hSubWin)
G_hSubWin.close();
}
</script>
</head>
<body>
<input type="button" value="打开" onclick="popWin('http://www.baidu.com')"/>
</body>
</html>
<script >
var a=window.showModelessDialog("2.htm");
</script>
<a href="3.htm">aaa</a>
这个本来就是父窗体的一部分,和alert差不多