1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
<!DOCTYPE HTML> <html> <head> <meta charset="UTF-8" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery-validation-1.8.1/jquery.validate.js"></script> <script type="text/javascript"> $( document ).ready( function() { $( "form" ).validate( { rules: { menge_1: "required", bezeichnung_1: { required: true, minlength: 2 }, euro_stueck_1: "required" }, messages: { menge_1: "Please enter 'Menge'", bezeichnung_1: { required: "Please enter 'Bezeichnung'", minlength: "'Bezeichnung' must consist of at least 2 characters" }, euro_stueck_1: "Please enter 'Euro/Stück'" } }); }); </script> </head> <body> <form> <table id="product"> <tr id="tr_0"><th>Menge</th><th>Bezeichnung</th><th>Euro/Stück</th></tr> <tr id="tr_1"> <td><input id="menge_1" type="text" /></td> <td><input id="bezeichnung_1" type="text" /></td> <td><input id="euro_stueck_1" type="text" /></td> </tr> </table> <br /> <input type="submit" value="OK"/> </form> </body> </html>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
<!DOCTYPE HTML> <html> <head> <meta charset="UTF-8" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery-validation-1.8.1/jquery.validate.js"></script> <script type="text/javascript"> $( document ).ready( function() { $( "form" ).validate( { rules: { menge_1: "required", bezeichnung_1: { required: true, minlength: 2 }, euro_stueck_1: "required" }, messages: { menge_1: "Please enter 'Menge'", bezeichnung_1: { required: "Please enter 'Bezeichnung'", minlength: "'Bezeichnung' must consist of at least 2 characters" }, euro_stueck_1: "Please enter 'Euro/Stück'" } }); }); </script> </head> <body> <form> <table id="product"> <tr id="tr_0"><th>Menge</th><th>Bezeichnung</th><th>Euro/Stück</th></tr> <tr id="tr_1"> <td><input name="menge_1" /></td> <td><input name="bezeichnung_1" /></td> <td><input name="euro_stueck_1" /></td> </tr> </table> <br /> <input type="submit" value="OK"/> </form> </body> </html>