Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 当用户输入任何数据时,如何防止ipad滚动_Html_Ios_Ipad_Scroll - Fatal编程技术网

Html 当用户输入任何数据时,如何防止ipad滚动

Html 当用户输入任何数据时,如何防止ipad滚动,html,ios,ipad,scroll,Html,Ios,Ipad,Scroll,当用户在ipad上输入数据时,有没有办法停止这种滚动?我尝试了不同的方法,但都不起作用 有没有办法停止这个滚动 这是我的密码 <html lang = "en"> <head> <title>formDemo.html</title> <meta charset = "UTF-8" /> <script>

当用户在ipad上输入数据时,有没有办法停止这种滚动?我尝试了不同的方法,但都不起作用

有没有办法停止这个滚动

这是我的密码

             <html lang = "en">
            <head>
            <title>formDemo.html</title>
            <meta charset = "UTF-8" />
            <script>
            $(document).ready(function() {  
                $(document).bind('touchmove', false);


          });

         </script>

         </head>
         <body>
        <h1>Form Demo</h1>
        <form>
       <label for="name">Text Input:</label>
       <input type="text"   name="name" id="inputtext"  onFocus="window.scrollTo(0, 0); value="" style="margin:400px 0 0 0;" />
       </form>
       </body>
       </html>

formDemo.html
$(文档).ready(函数(){
$(document).bind('touchmove',false);
});
表格演示
文本输入:

你的问题几乎得到了回答。您只需将您的逻辑与以下内容结合起来:

$(document).bind('touchmove', false); // or true, depends you want to disable / enable

你的意思是你在一个网站上工作,而不是一个
UIWebView
,对吗?是的,我在网站上工作的是html而不是UIWebView UIWebView是本地的,请查看我更新的问题,我正在使用与你问的相同的问题,但它不工作它没有滚动。事实上,它没有足够的内容来滚动。看:你是在谈论移动Safari的反弹效应吗?