|
|
Email Validation Using Javascript - Javascript
|
Views : 338
|
|
Tagged in : Javascript
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Email Validation Using Javascript
<form name="validation" onSubmit="checkmail()">
Enter email address:
<input type="text" name="email">
<input type="submit" value="Submit">
</form>
<script type="text/javascript">
function checkmail(){
var str=document.validation.email.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
alert("You have entered valid email address");
else alert("Please Enter a valid email address");
}</script>
|
|
By - raveendran, On - 2010-01-28 |
|
|
|