Javascript IFrame未定义车身加载时的值
如何使用body onload获得iframe的值,我得到一个未定义的值 我的非工作代码: index.htmlJavascript IFrame未定义车身加载时的值,javascript,iframe,onload,onload-event,Javascript,Iframe,Onload,Onload Event,如何使用body onload获得iframe的值,我得到一个未定义的值 我的非工作代码: index.html <body onload ="loadThis()"> <iframe id = "myframe" src = "sample.html"></iframe> </body> 函数“loadThis()”在加载Iframe之前运行。我如何才能让它工作?您应该这样做: <body > <ifra
<body onload ="loadThis()">
<iframe id = "myframe" src = "sample.html"></iframe>
</body>
函数“loadThis()”在加载Iframe之前运行。我如何才能让它工作?您应该这样做:
<body >
<iframe onload ="loadThis()" id = "myframe" src = "sample.html"></iframe>
</body>
我还没想到,很好。
<body >
<iframe onload ="loadThis()" id = "myframe" src = "sample.html"></iframe>
</body>