Javascript examples for jQuery Method and Property:attr
Clear Attribute required for options in jquery
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.js"></script> <script type="text/javascript"> $(window).load(function(){//from w w w . j ava 2 s . c o m $('select').attr("required",""); }); </script> </head> <body> <form> <select> <option value=""></option> <option value="something">someting</option> </select> <input type="submit"> </form> </body> </html>