Wednesday, 11 September 2013

Script for validating textbox using Jquery

Script for validating textbox using Jquery

<script type="text/javascript" language="javascript">
         $(document).ready(function () {
             $('#btn_submit').click(function () {
                 if ($("#txt_name").val() != "") {
                     return true;
                 }
                 else {
                     alert("pls enter ur name")
                     return false;
                 }
             });
         });
       
    </script>

No comments:

Post a Comment