I have a web application which makes use of the HTML5 required
attribute frequently. However Safari and ie 8/9 do not support this attribute. Is there a jQuery plugin that will force the behaviour on non-compatible browsers?
相关问题
- Views base64 encoded blob in HTML with PHP
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
You can use h5validate which does exactly what you need.
You could shim it simply...
I wrote a very simple jQuery plugin for this. It just adds client side validation to a forms using the 'required' attribute.
https://github.com/garyv/jQuery-Validation-plugin
After including the plugin, you can call the validate() in jQuery's document ready function or at the end of the html body.
Found a very versatile and lightweight (once minified) engine that works cross-browser including ie8!
http://posabsolute.github.io/jQuery-Validation-Engine/
This works without any plugin (JQuery only):