How to validate an email address using JavaScript?
<p>i am trying to doing input validation its my complete code but it is not working well.</p>

<pre><code>&lt;html&gt;

&lt;head&gt;

&lt;title&gt;Testing Validation&lt;/title&gt;
&lt;script type = "text/javascript"&gt;
function getvalue()
{
    value = document.getElementById('myId').value;
    if(value &lt; 'a' || value &gt; 'z' || value != '@' &amp;&amp; value != '.')
    {

        alert("Not a valid E-mail adress");
    }
}

&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;form name = "frm"&gt;
&lt;input type="text" name="input" size="40" id="myId" /&gt;
&lt;input type = "submit" name = "submit" onclick="getvalue()" /&gt;
&lt;/form&gt;
&lt;/body&gt;

&lt;/html&gt;
</code></pre>
