Home >Web Front-end >HTML Tutorial >获取iframe 的document方式,并且防止触摸滑动_html/css_WEB-ITnose

获取iframe 的document方式,并且防止触摸滑动_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:21:051289browse

  1. 获取到document,var doc = document.getElementById('mainFrame' ).contentDocument || document.frames['mainFrame'].document;

  2. 添加触摸事件

  3. doc.addEventListener('touchmove',function(event){   event.preventDefault();},false);
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn