iframe对象如何使用scrolling属性

2025-04-23 06:03:47

1、创建一个名称为 iframe_scrolling的html文件

iframe对象如何使用scrolling属性

2、添加一个框架设置框架的id和src,scrolling属性为yes

iframe对象如何使用scrolling属性

3、添加一个button按钮,在点击事件中加入自定义函数my衡痕贤伎scrolling添加一p标签,设置id 为 showscrolling

iframe对象如何使用scrolling属性

4、在javascript中创建一个自定义函数 myscrolling

iframe对象如何使用scrolling属性

5、在自定义函数中获取iframe对象。用scrolling属性获取滚动条属性值,将获取的值显示到p标签中

iframe对象如何使用scrolling属性

6、在浏览器中打开文件,点击button查看效果

iframe对象如何使用scrolling属性
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢