Html5表单验证不适用于iphone,android或safari

问题描述:

我正在尝试为我的网络应用程序实现html5表单验证,但它不能使用
safari 5.0.1,iphone3或android2。这些浏览器是否支持表单输入属性,模式或与验证相关的任何内容,或者我犯了一些错误?

I am trying to implement html5 form validation for my web app but it's not working with safari 5.0.1 , iphone3 or android2. Is the form input attribute required, pattern or anything related to validation not supported by these browsers or i am making some mistake?

它正在使用mozilla,chrome和opera。如果我使用html5表单验证,那么我再次需要编写代码作为后备。使用这个或更老的方式作为jquery和普通的javascript是一个好主意?如果有任何想法请告诉我。

It's working with mozilla, chrome and opera. If i use html5 form validation then again i need to write code as fallback. Is it a good idea to use this or the older way as jquery and plain javascript? If any one have idea please tell me.

请检查此链接(我写了一些代码)并在iphone,android或safari中试用:

Please check this link (i wrote some code) and try it in iphone, android or safari:

http:// 24ways .org / examples / have-a-field-day-with-html5-forms / 24ways-form.html

如果您正在使用jQuery,可以查看 h5Validate插件。这为IE6增加了对表单验证的跨浏览器支持。根据项目网站

If you're using jQuery, you could take a look at the h5Validate plugin. This adds cross-browser support for form validations down to IE6. According to the project's website:



  • 在13种不同的浏览器上定期测试,IE6 - IE9,FireFox,
    Chrome,iPhone和Android。

  • Regularly tested on 13 different browsers, IE6 - IE9, FireFox, Chrome, iPhone, and Android.

根据1,000个用户调查,几个
可用性研究以及实时
生产环境中数百万用户的行为实施最佳实践。

Implements best practices based on 1,000 user survey, several usability studies, and the behavior of millions of users in live production environments.

支持的平台:


  • 桌面:IE 9,8,7,6,Chrome,Firefox,Safari和Opera。测试
    Windows 7和Mac。

  • Desktop: IE 9, 8, 7, 6, Chrome, Firefox, Safari, and Opera. Tested on Windows 7 and Mac.

手机:iPhone,Android,Palm WebOS

Mobile: iPhone, Android, Palm WebOS