parent.htm:
<body>
<iframe id=fr1 src =child.htm></iframe>
<INPUT id="Button1" onclick='alert(document.all.fr1.contentWindow.tb1.checked);' type="button" value="判断" name="Button1">
</body>child.htm:
<body>
<INPUT type="checkbox" ID="tb1" NAME="tb1">
</body>
<body>
<iframe id=fr1 src =child.htm></iframe>
<INPUT id="Button1" onclick='alert(document.all.fr1.contentWindow.tb1.checked);' type="button" value="判断" name="Button1">
</body>child.htm:
<body>
<INPUT type="checkbox" ID="tb1" NAME="tb1">
</body>
解决方案 »
- +展开-收起 ??
- IE下 iframe editor blur 问题
- 没见过此写法 谁见过 指点一下 js
- jslab中的swapvar的疑惑
- 关于call(apply)继承法+原型继承法组合的一点小疑问
- 做了个AJAX验证,怎么只认IE,换上别的浏览器就不认,怎么办?
- extjs combobox 级连
- 怎样实现Table中的英文文字自动断 并加上"-"连字符号?非手动完成
- 求,showModalDialog,dialogArguments.bodytext的意义和参数??急!
- 如何循环一个div并且显示不同内容
- 寻找一个效果!
- 100分求教,在页面间跳转时,当第二个页面没有加载全时显示一中间过渡页面,当第二个页面加载全时显示第二个页面
<script>
function check(){
var str=""
var c=ifrm.document.frm.elements['c']
for(i=0;i<c.length;i++)if(c[i].checked)str+=i+"个先中了:"+c[i].value
alert(str)
}
</script>b.htm
<form name=frm>
<input type=checkbox name=c value=1>
<input type=checkbox name=c value=2>
<input type=checkbox name=c value=3>
<input type=checkbox name=c value=4>
</form>
<body>
<iframe id=fr1 src =child.htm></iframe>
<INPUT id="Button1" onclick='alert(document.all.fr1.contentWindow.tb1.checked);'alert(document.all.fr1.contentWindow.tb1.value);' type="button" value="判断" name="Button1">
</body>child.htm:
<body>
<INPUT type="checkbox" ID="tb1" NAME="tb1" value="shyslysky">
</body>