html5 required and jQuery submit()

后端 未结 9 617
我在风中等你
我在风中等你 2020-12-09 07:56

I\'m trying to implement html5 into a form, but I came with a problem when I submit the form through jquery and try to use the html5 \"required\" attribute.

Here is

9条回答
  •  悲哀的现实
    2020-12-09 09:01

    Working demo http://jsfiddle.net/3gFmC/

    Hope this will help :)

    code

    $('#btn_submit').bind('click', function() {
    
            $('input:text[required]').parent().show();
            // do whatever;
     });
    

提交回复
热议问题