帮忙看看!怎样把对话框里面的值或者一个网页的输入值传到另一个网页的text框中!谢谢!
比如说!我在一个网页中点击 弹出一个网页或者对话框,在弹出的网页或者对话框中输入值能够传到,第一点击的网页中的text框中??谢谢 帮帮忙???
------解决方案--------------------a.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN ">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME= "Generator " CONTENT= "EditPlus ">
<META NAME= "Author " CONTENT= " ">
<META NAME= "Keywords " CONTENT= " ">
<META NAME= "Description " CONTENT= " ">
<SCRIPT LANGUAGE= "JavaScript ">
<!--
function openNewDialog(){
var url = "b.html ";
var strReturn = window.showModalDialog(url);
document.getElementById( "text1 ").value = strReturn;
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE= "text " NAME= "text1 ">
<INPUT TYPE= "button " onclick= "openNewDialog() " value= "test ">
</BODY>
</HTML>
b.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN ">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME= "Generator " CONTENT= "EditPlus ">
<META NAME= "Author " CONTENT= " ">
<META NAME= "Keywords " CONTENT= " ">
<META NAME= "Description " CONTENT= " ">
</HEAD>
<BODY onunload= "window.returnValue=document.getElementById( 'text1 ').value; ">
<INPUT TYPE= "text " NAME= "text1 " value= " ">
</BODY>
</HTML>