---
title: "禁止IOS 上的web应用全屏显示滚动 "
author: "何不笑"
date: "2013-01-24T20:58:24Z"
tags: []
categories: ["移动开发"]
slug: "ios-web"
draft: false
lastmod: "2013-01-24T20:59:35Z"
id: 1775378
url: "https://wait7758521.iteye.com/blog/1775378"
---

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();  
                }  
            }   
}