not validating special character "_" in javascript
<p>hello i am using javascript to validate field</p>

<p>i am checking special characters.. the code i am implementing validates all the special characters except   _  underscore..</p>

<pre><code>   &lt;script type="text/javascript" language="javascript"&gt;
function validateForm()
{
    var iChars = "!@#$%^&amp;*()+=-[]\\\';,./{}|\":&lt;&gt;?_";

   for (var i = 0; i &lt; document.reg_form.txtusername.value.length; i++) 
        {
            if (iChars.indexOf(document.reg_form.txtusername.value.charAt(i)) != -1) 
                {
                    alert ("Special Characters are not allowed.");
                    return false;
                        }
         }
    return true;
}
&lt;/script&gt;
</code></pre>

<p>for this filed </p>

<pre><code>&lt;input name="txtusername" type="text" id="txtusername" maxlength="10" style="background-color:#CCC"  /&gt;
</code></pre>

<p>but its not validating the underscore</p>
