手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >JS去除iframe滚动条的方法
JS去除iframe滚动条的方法
摘要:本文实例讲述了JS去除iframe滚动条的方法。分享给大家供大家参考。具体如下:下面的代码可以通过修改scrolling来去除iframe的...

本文实例讲述了JS去除iframe滚动条的方法。分享给大家供大家参考。具体如下:

下面的代码可以通过修改scrolling来去除iframe的滚动条

<!DOCTYPE html> <html> <head> <script> function removeScroll() { document.getElementById("myframe").scrolling="no"; } </script> </head> <body> <iframe id="myframe" src="http://www.jb51.netdefault.asp" scrolling="auto"> <p>Your browser does not support iframes.</p> </iframe> <p>The value of the scrolling attribute is: <script> document.write(document.getElementById("myframe").scrolling); </script> <p> <input type="button" value="Remove Scrollbars"> <p>Internet Explorer, Google Chrome, Opera, and Safari have problems with setting the scrolling attribute.</p> </body> </html>

希望本文所述对大家的javascript程序设计有所帮助。

【JS去除iframe滚动条的方法】相关文章:

JS+DIV实现鼠标划过切换层效果的方法

jQuery实现html表格动态添加新行的方法

Javascript实现div层渐隐效果的方法

jQuery实现自动滚动到页面顶端的方法

Jquery实现动态切换图片的方法

JavaScript检测鼠标移动方向的方法

javascript清空table表格的方法

jQuery实现给页面换肤的方法

js实现鼠标划过给div加透明度的方法

JavaScript实现DIV层拖动及动态增加新层的方法

精品推荐
分类导航