OnSubmit与Mobile Safari

时间:2010-01-03 06:06:42

标签: jquery iphone webkit mobile-safari onsubmit

使用jCart时,我注意到它在iPhone上无效。经过一些测试(并与jcart forum上的开发人员交谈),似乎单击提交按钮时无法调用提交处理程序:

$('form.jcart').submit(function(){...});

我尝试将其更改为:

$("form.jcart input[type='submit']").click(function(){...});
// There were some other code changes needed to make this change work,
// but they are omitted for brevity (they don't impact the problem).

这也行不通。我在iPhone上发现了其他有关.submit / onsubmit问题的报告,但似乎没有人找到解决办法?

1 个答案:

答案 0 :(得分:3)

乔纳森:我解决了我们遇到的问题。事实证明,一些补充代码是问题的根源,通过删除它,一切都在iPhone,iPod Touch上正常工作。

我已经在jCart论坛上描述了解决方案: http://conceptlogic.com/jcart/help/viewtopic.php?f=3&t=316&start=10