Friday, April 17, 2009

Simplest example for JQuery validation

<html>

<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js">
</script>
<script>

$(document).ready(function(){
$("#contactForm").validate();
});
</script>


<body>
<div id="container">
<form id="contactForm" method="" action="">
<label for="cemail">E-Mail</label>
<input id="cemail" name="email" size="25" class="required email" />
<input id="number" name ="number" class="required number"/>
<input class="submit" type="submit" value="submit"/>
</form>
</div>

</body>
</html>

No comments:

Post a Comment