Hot File

How To Validate A Name In JQuery with HTML?

View: 328    Dowload: 0   Comment: 0   Post by: hanhga  
Author: none   Category: HTML-CSS template   Fields: Other

0 point/0 review File has been tested

Example:

Introduction

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?

How To Validate A Name In JQuery with HTML? Posted on 26-08-2016  Example: 5/10 328

Comment:

To comment you must be logged in members.

Files with category

 
Newsletter Email

File suggestion for you

File top downloads

logo codetitle
Codetitle.com - library source code to share, download the file to the community
Copyright © 2015. All rights reserved. codetitle.com Develope by Vinagon .Ltd