The streamlined version of Script House. Generally, many cms have some such functions. The selection related articles in dedecms also use such a function. The specific code is given below. Core code of parent page: Copy code The code is as follows: <br>function SelectArcListA(fname){ <br>var posLeft = 10; <br>var posTop = 10; <br>window.open("content_select_list.asp?f=" fname "&k=" form1.keyword.value , "selArcList", "scrollbars=yes,resizable=yes,statebar=no,width=700,height=500,left=" posLeft ", top=" posTop); <br>}<br> Core code of sub-page: Copy code The code is as follows: <br>//Get the file name of the selected file<br>function getCheckboxItem() <br>{ <br> var allSel=""; <br>if(document.form2.arcID.value) return document.form2.arcID.value; <br>for(i=0;i<document.form2.arcID.length;i ) <BR>{ <BR>if(document.form2.arcID[i].checked) <BR>{ <BR>if(allSel=="") <BR>allSel = document.form2.arcID[i].value; <BR>else <BR>allSel = allSel "," document.form2.arcID[i].value; <BR>} <BR>} <BR>return allSel; <BR>} <BR>function selAll() <BR>{ <BR>for(i=0;i<document.form2.arcID.length;i ) <BR>{ <BR>if(!document.form2.arcID[i].checked) <BR>{ <BR>document.form2.arcID[i].checked=true; <BR>} <BR>} <BR>} <BR>function noSelAll() <BR>{ <BR>for(i=0;i<document .form2.arcID.length;i ) <BR>{ <BR>if(document.form2.arcID[i].checked) <BR>{ <BR>document.form2.arcID[i].checked=false; <BR>} <BR>} <BR>} <BR>function ReturnValue() <BR>{ <BR>if(window.opener.document.form1.xiangguanid.value==""){ <BR>window.opener .document.form1.xiangguanid.value = getCheckboxItem(); <BR>} <BR>else{ <BR>window.opener.document.form1.xiangguanid.value = "," getCheckboxItem(); <BR>} <BR>alert("The ID you selected has been added successfully, you can continue to add"); <BR>//window.opener=true; <BR>//window.close(); <BR>}<BR></div> <BR>The following is the html code. The page needs <input type="checkbox" name="arcID" value="<%=rs("id")%>"> to output the selected id<br> <div class="codetitle"> <span><a style="CURSOR: pointer" data="66284" class="copybut" id="copybut66284" onclick="doCopy('code66284')"><u>Copy code</u></a></span> The code is as follows:</div> <div class="codebody" id="code66284"> <br><A class=inputbutx <BR>href="javascript:selAll ()">Select All</A> <A class=inputbutx <BR>href="javascript:noSelAll()">Cancel</A> <A class=inputbutx <BR>href=" javascript:ReturnValue()">Add the selected value to the list</A><br> </div> <br>The following is a supplement: <br>//Modal form passing value<br><br>< ;!-- ====== Parent form, I named it parentform.html ==== --> <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="5805" class="copybut" id="copybut5805" onclick="doCopy('code5805')"><u>Copy code</u></a></span> The code is as follows: </div> <div class="codebody" id="code5805"> <br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <br><HTML> <br> <HEAD> <br><title> After entering the data in the pop-up window, it is returned to the parent form - the main form</title> <br><META NAME="Generator" CONTENT="EditPlus"> ; <BR><META NAME="Author" CONTENT="jb 51.net"> <br><META NAME="Keywords" CONTENT=""> <br><META NAME="Description" CONTENT=""> <br><br><script language="javascript" type="text/javascript"> <br>function doInput() <br>{ <br>var win = window.showModalDialog( "Childform.html",window,"dialogWidth=500px;dialogHeight=300px;center=yes;status=no"); <br>if(win != null) <br>{ <br>document.getElementById("parentTextBox ").value = win; <br>} <br>} <br> Enter data in the new pop-up form , transferred to the parent form. Click here to pop up the subform