var nameval= new String();
var name1=document.getElementById("name").value;
it is better to compare the length insted comparing the value of the string in javascript...
For example, instead of comparing...
you can verify...
|
You can simply check the values like this:
if (!myValue) { ... }
Checks if nothing is entered in the input box
if(nameval == "")
{
//code
}
No comments:
Post a Comment