One: Parent page
1: Proofing Staff Number text box code:
<input name= "Txtjdry" type= "text" id= "Txtjdry" size= "maxlength=" "readonly=" readonly "value=" ${ REQUESTSCOPE.TXTGETYHBH} "class=" Readonlytext/>
2: Find Number button code:
<input type= "button" Name= "Button2" value= "lookup number" onclick= "Searchcode ()" accesskey= "Q" style= "cursor= ' Hand '" "/>
3: Find the number button called the JS Method: Searchcode (), when clicked on the lookup Number button to pop up the following picture:
function Searchcode () {
var wndmepimgpreview=window.open ("<%=basepath%>cxaction.do?action=cxjdry", " Wndmepimgpreview "," toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,left= 200,top=200 ");
Wndmepimgpreview.focus ();
}
Two: Child pages
Radio Box Code:
<c:foreach items= "${listusers}" var= "message" varstatus= "index" >
<tr onmouseover= " this.style.background= ' #ececec ' "onmouseout=" this.style.background= ' #ffffff ' "style=" cursor= ' Hand ' ">
< TD align= "Center" ><input type= "Radio" id= "TXTGETYHBH" name= "TXTGETYHBH" value= "${MESSAGE.YHBH}"/></td >
<td align= "center" >${message.yhbh}</td>
<td align= "center" >${message.yhmc}</td >
<td align= "center" >${message.zsxm}</td>
</tr>
</c:forEach>
1: Select one of the radio buttons, click on the Add Number button will be selected to upload the user number to the parent page
The JS code for this page is as follows:
Button buttons:
<input name= "btnquery" type= "button" id= "Btnquery" value= "Add Number" style= "cursor= ' Hand '" " onclick=" Win () " >
JS Win () method:
Function win () {
var radios = document.getelementsbytagname ("input");
for (var i = 0; I<radios.length i++) {
if (radios[i].type== "Radio" && radios[i].checked) {
Window.opener.document.getElementById ("Txtjdry"). Value=radios[i].value;//txtjdry is the ID of the text box to be displayed in the text box in the parent page
}
Window.close ();
}
2: When the number button is clicked, the user number in the selected radio box is passed into the text box of the parent page, for example: the check number is 21, the figure is as follows: