Demo
Code
Code
<script src="http://code.jquery.com/jquery-latest.js"></script> <form action="#" target="_blank"> <input type="text" /> <input type="submit" /> </form> <span style="color:red;" id='alert'></span> <script> $("form").submit(function() { if ($("input:first").val() != "") return true; $("#alert").text("Empty Text Box!!").show().fadeOut(1500); return false; }); </script>
Comments
Post a Comment