Loading...
Loading...
Loading...
Loading...

How To Validate A Name In JQuery with HTML?

View: 598    Dowload: 0   Comment: 0   Post by: hanhga   Category: HTML-CSS template   Fields: Other

Example:

<!Doctype html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
</head>
 
<script>
$(document).ready(function() {
 $("button").click(function() {
 var user_full_name = $.trim($("#txt_user_full_name").val());
 if(user_full_name != "") {
 if(!user_full_name.match(/^[a-zA-Z ]*$/))
 alert("Only alphabetic characters are allowed!");
 else 
 alert("Name is validated.");
 }
 else 
 alert("Please enter name!");
 });
});
</script>
 
<body>
 <input type="text" name="txt_user_full_name" id="txt_user_full_name" placeholder="Enter name"> <br>
 <button> Submit </button>
</body>

How To Validate A Name In JQuery with HTML?

Example:

Posted on 26-08-2016 

Comment:

To comment you must be logged in members.

Files with category

 
File suggestion for you
File suggestion for you
File suggestion for you
File suggestion for you
Loading...
Loading...
Loading...
Loading...
File top downloads
File top downloads
File top downloads
File top downloads
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Codetitle - library source code to share, download the file to the community
Copyright © 2018. All rights reserved. codetitle Develope by Vinagon .Ltd