<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>test1</title>
</head><body>
<input name=textinput>
 <script>
   textinput.value=window.showModalDialog("temp_test2.htm")
 </script></body></html>
temp_test2.htm
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>test2</title>
</head><body>
<input onblur="inputbox(this.value)">
<input type="button" onclick="okbutton()" value="确定">
<script>
var secel="没有选择"function inputbox(bbb)
{
secel=bbb
}
function okbutton()
{
window.returnValue="你输入的值为:"+secel;
window.close();
}
</script>
</body>
</html>