Check valid email address by Javascript

Hello Friends,
Hope you are fine. I am fine. Today, I am showing how to check valid email address by using javascript. Its a very primary label work for javascript programmer. This task for javascript beginner. Lets start the work.

<!DOCTYPE html>
<title>Learn JavaScrtipt</title>


function emailchk(){

var x =;

if(x.indexOf(“@”) == -1){
alert(“Please entair a valid email address”);




<form name=”aa”>

<input type=”text” name=”bb” value=”” placeholder=”Type your email” onBlur=”emailchk()”>
<input type=”text” name=”cc” value=”” placeholder=”Type your phone” onClick=””>


This is the code for all the work. Now, save your fine and run this file. Well, now, your file is ready to use. Just blur your text field and you will see some interactive work by javascript.

Thanks for reading.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s