将下面代码保存为index.asp
function aaa(canshu,xuanze)
{
//alert(canshu);
window.open ("2.asp?canshu="+canshu+"&xuanze="+xuanze, "newwindow", "height=100, width=400, top=300, left=250, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no")
}
将下面代码保存为2.asp
<%
dim canshu,xuanze
canshu=request.QueryString("canshu")
xuanze=request.QueryString("xuanze")
%>
function check()
{
var num;
var flag=false;
num=document.childform.bbb.length;
for (j=0;j { if(document.childform.bbb[j].checked) {flag=true; window.opener.document.fatherform.<%=canshu%>.value=document.childform.bbb[j].value; window.close(); } } if(!flag) { alert("没有选择!"); window.close(); } } 运行试试 更多信息请查看IT技术专栏