手机
当前位置:查字典教程网 >编程开发 >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滚动条的方法】相关文章:

javascript清空table表格的方法

jQuery实现给页面换肤的方法

js动态创建及移除div的方法

Javascript实现每日自动换一张图片的方法

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

Javascript实现飞动广告效果的方法

javascript实现table表格隔行变色的方法

Jquery动态添加输入框的方法

JavaScript实现表格点击排序的方法

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

精品推荐
分类导航