1 设计一个网页,使得打开它时弹出一个全屏的窗口,该窗口中有一个文本框和一个按钮。用户在文本框中输入信息后点击按钮就可以把窗口关闭,而输入的信息却在主网页中显示
a.php
<html>
<script>
window.open("b.php",'erp',"toolbar=no,location=no,status=no,scrollbars=no,menubar=no,channelmode");
</script>
<body>
<input type="text" id="text1" />
</body>
</html>
b.php
<html>
<script>
function cl() {
var v = document.getElementById("testText").value;
window.opener.document.getElementById("text1").value = v;
window.close();
}
</script>
<body>
<input type="text" name="text" id="testText">
<input type="button" οnclick="cl();" value="submit"/>
</body>
</html>
window.open 参见 http://bocolijun.iteye.com/blog/211380
关于子父窗口的操作参见 http://www.book18.net/book/427.html