[JavaScript] JS代码获取iframe的marginHeight和marginWidth属性 →→→→→进入此内容的聊天室

来自 , 2020-09-07, 写在 JavaScript, 查看 142 次.
URL http://www.code666.cn/view/d994e372
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <iframe id="myframe" src="demo_iframe.htm" marginheight="50" marginwidth="50">
  6. <p>Your browser does not support iframes.</p>
  7. </iframe>
  8. <br><br>
  9.  
  10. <p>The value of the marginheight attribute and marginwidth are:
  11. <script>
  12. document.write(document.getElementById("myframe").marginHeight);
  13. document.write(document.getElementById("myframe").marginWidth);
  14. </script>
  15. <p>
  16.  
  17. </body>
  18. </html>
  19.  
  20. //javascript/7945

回复 "JS代码获取iframe的marginHeight和marginWidth属性"

这儿你可以回复上面这条便签

captcha