<!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" >
<title>测试页面</title>
<head>
<script language="javascript" type="text/javascript">
function winopen()
{
var str;
str=window.showModalDialog('subWindow.html',null,'toolbar=no,width=560,height=900');
if(str!=undefined)
{
document.all.input1.value=str;
}
}
</script>
</head>
<body>
<br/>
<a href="javascript: winopen()">打开窗口</a>
<br/>
</body>
</html>
<html>
<title>测试页面</title>
<head>
<script language="javascript" type="text/javascript">
function winclose(str)
{
window.parent.returnValue = str;
window.parent.close();
}
</script>
</head>
<body>
<a href="#" οnclick="winclose('123456')">关闭</a>
<input id="Button1" οnclick="winclose('abc')" type="button" value="button" />
</body>
</html>