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>

解决方案 »

  1.   

    <iframe name=ifrm src="b.htm"></iframe><input type=button value="check" onclick="check()">
    <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>
      

  2.   

    parent.htm:
    <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>