手机
当前位置:查字典教程网 >编程开发 >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的方法

javascript清空table表格的方法

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

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

JavaScript点击按钮后弹出透明浮动层的方法

jQuery实现给页面换肤的方法

JavaScript实现鼠标滑过处生成气泡的方法

javascript实现Table排序的方法

JS显示日历和天气的方法

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

精品推荐
分类导航