Directly on the code, there are some places to use:
Copy Code code as follows:
<! 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 Selectvalue () {
window.open ("sub.html", "" "," Status:no;resizable:yes;dialogheight:410px;dialogwidth:460px;unadorne:yes ")
}
-->
</SCRIPT>
</HEAD>
<BODY>
Text:<input type= "text" name= "Testinput"/><br>
<input type= "button" onclick= "Selectvalue ()" value= "select"/>
</BODY>
</HTML>
The sub.html page code is
Copy Code code as follows:
<! 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 Selectvalues () {
var obj = document.getelementsbyname ("temp");
var value = "";
for (var i = 0; i < obj.length i + +) {
if (obj[i].checked = = True)
Value + + Obj[i].value;
}
Window.opener.document.all.testInput.value = value;
Window.close ();
}
-->
</SCRIPT>
</HEAD>
<BODY>
<input type= "checkbox" name= "temp" value= "a"/> a <br>
<input type= "checkbox" name= "temp" value= "B"/> B <br>
<input type= "checkbox" name= "temp" value= "C"/> C <br>
<input type= "checkbox" name= "temp" value= "D"/> D <br>
<input type= "button" value= "OK" onclick= "selectvalues ()"/>
</BODY>
</HTML>