[JavaScript] 通过JS代码去除iframe的滚动条代码 →→→→→进入此内容的聊天室

来自 , 2020-12-23, 写在 JavaScript, 查看 135 次.
URL http://www.code666.cn/view/72c25197
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script>
  5. function removeScroll()
  6. {
  7. document.getElementById("myframe").scrolling="no";
  8. }
  9. </script>
  10. </head>
  11. <body>
  12.  
  13. <iframe id="myframe" src="/default.asp" scrolling="auto">
  14. <p>Your browser does not support iframes.</p>
  15. </iframe>
  16.  
  17. <p>The value of the scrolling attribute is:
  18. <script>
  19. document.write(document.getElementById("myframe").scrolling);
  20. </script>
  21. <p>
  22.  
  23. <input type="button" onclick="removeScroll()" value="Remove Scrollbars">
  24.  
  25. <p>Internet Explorer, Google Chrome, Opera, and Safari have problems with setting the scrolling attribute.</p>
  26.  
  27. </body>
  28. </html>
  29.  
  30. //javascript/7947

回复 "通过JS代码去除iframe的滚动条代码"

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

captcha