获取iframe的document方式,并且防止触摸滑动_html/css
来源:动视网
责编:小采
时间:2020-11-27 16:24:17
获取iframe的document方式,并且防止触摸滑动_html/css
获取iframe的document方式,并且防止触摸滑动_html/css_WEB-ITnose: 获取到document,var doc = document.getElementById('mainFrame' ).contentDocument document.frames['mainFrame'].document; 添加触摸事件 doc.addEventListener('touchmove',function(event){ e
导读获取iframe的document方式,并且防止触摸滑动_html/css_WEB-ITnose: 获取到document,var doc = document.getElementById('mainFrame' ).contentDocument document.frames['mainFrame'].document; 添加触摸事件 doc.addEventListener('touchmove',function(event){ e

获取到document,var doc = document.getElementById('mainFrame' ).contentDocument || document.frames['mainFrame'].document;
添加触摸事件
doc.addEventListener('touchmove',function(event){ event.preventDefault();},false);
获取iframe的document方式,并且防止触摸滑动_html/css
获取iframe的document方式,并且防止触摸滑动_html/css_WEB-ITnose: 获取到document,var doc = document.getElementById('mainFrame' ).contentDocument document.frames['mainFrame'].document; 添加触摸事件 doc.addEventListener('touchmove',function(event){ e