0
我有一个奇怪的问题,可能是我不知道的令人惊讶的愚蠢的事情,我会尽力解释,希望有人能够帮助。我正在用iOS 5在iPad上测试此功能。触摸事件蔓延到下一页?
我有page1.html
和page2.html
。在page1
我有我点击一个元素,它运行一个JS功能,带我到page2
:
<div id="occasion" ontouchend="test();"></div>
function test(){
window.location.href="page2.html";
}
Page2
是空的除了下面来告诉我,如果点击事件发生:
<div style="background-color:red;position:fixed;width:100%;height:100%;" onclick="pageTest();">test</div>
function pageTest(){
alert("hello");
}
因此,当page2
打开时,我收到你好的提醒,因此上一页的touchevent
有什么结果?
Page1
使用jQuery,PhoneGap和一个CSS文件。如果我将touchend
或touchstart
更改为onclick
一切都很好?
有谁知道什么可能会导致这种情况,这真的很烦我!
邮件列表上有一个人有类似的问题。看看他做了什么,因为它可以帮助http://groups.google.com/group/phonegap/browse_thread/thread/2228ba2b46977171/e5072dc3424a564f – 2011-12-14 19:36:46
谢谢西蒙这似乎是确切的问题,什么是他指的MBP?移动样板?任何想法,我怎么做到这一点? – mao 2011-12-14 19:52:10