ITeye博客

禁止IOS 上的web应用全屏显示滚动

何不笑 · 2013-01-24 20:58 · Web App · 移动开发 · Markdown

if(ua.match(/ipad/i)=="ipad" || ua.match(/iphone/i)=="iphone"){
            //禁止web应用全屏显示时页面可以滚动
            document.ontouchmove = function(e){
                if (document.body.scrollHeight == document.body.clientHeight){
                    event.preventDefault();
                }
            } 
}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。