您的位置:首页 > 其它

使用iscroll后,input等不能输入内容的解决办法

2015-09-29 16:41 375 查看
在iscroll.js文件中加入如下代码

function allowFormsInIscroll(){
[].slice.call(document.querySelectorAll('input, select, button')).forEach(function(el){
el.addEventListener(('ontouchstart' in window)?'touchstart':'mousedown', function(e){
e.stopPropagation();

})
})
}
document.addEventListener('DOMContentLoaded', allowFormsInIscroll, false);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: