frames["frameName"]用法bug?
闲话少说,直接上代码:
<body><iframe name="frameName" id="frameName" ></iframe><script type="text/javascript"> var frameName22 = {a:1635879}; var obj = frames["frameName"]; for(var k in obj){ alert(k+"========="+obj[k]); }</script></body>
<body><iframe name="frameName" id="frameName"></iframe><script type="text/javascript"> var frameName = {a:1635879}; var obj = frames["frameName"]; for(var k in obj){ alert(k+"========="+obj[k]); }</script></body>
<body><script type="text/javascript"> var frameName = {a:1635879}; var ifrObj = document.createElement('iframe'); ifrObj.name = "frameName"; ifrObj.id = "frameName"; document.body.appendChild(ifrObj); var obj = frames["frameName"]; for(var k in obj){ alert(k+"========="+obj[k]); }</script></body>