比如说!我在一个网页中点击 弹出一个网页或者对话框,在弹出的网页或者对话框中输入值能够传到,第一点击的网页中的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>