足球游戏_中国足彩网¥体育资讯$

返回父窗口并传回数据
来源:易贤网 阅读:660 次 日期:2015-09-06 15:52:18
温馨提示:易贤网小编为您整理了“返回父窗口并传回数据”,方便广大网友查阅!

将下面代码保存为index.asp

<form name=fatherform>

<%

for i=1 to 10

%>

收件人:<input type=text name=shoujianren<%=i%> /> 纸条类型<input readonly=readonly type=text name=zhitiao<%=i%> value=默认 onclick=aaa(this.name,this.value)/><br />

<%

next

%>

</form>

<script>

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)

}

</script>

将下面代码保存为2.asp

<title>请选择</title>

<%

dim canshu,xuanze

canshu=request.querystring(canshu)

xuanze=request.querystring(xuanze)

%>

<form name=childform>

<input type=radio name=bbb value=默认 <%if xuanze=默认 then response.write checked%> >默认

<input type=radio name=bbb value=高兴 <%if xuanze=高兴 then response.write checked%> >高兴

<input type=radio name=bbb value=黯然销魂 <%if xuanze=黯然销魂 then response.write checked%>/>黯然销魂

<input type=button onclick=check(); value=确定>

</form>

<script language=javascript>

function check()

{

var num;

var flag=false;

num=document.childform.bbb.length;

for (j=0;j<num;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();

}

}

</script>

运行试试

中国足彩网信息请查看IT技术专栏

中国足彩网信息请查看脚本栏目
易贤网手机网站地址:返回父窗口并传回数据
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 足球游戏_中国足彩网¥体育资讯$ 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标