JavaScript return Value to Label or TextBox — JavaScript — ASP.Net Example
ASP.Net Example-JavaScript return Value to Label or TextBox

Wednesday, March 16, 2011

JavaScript return Value to Label or TextBox

Here Example of Email Validation is given

function Email(obj1)
{
var email=obj1.value;
//alert(email);
var reguex=/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
if(reguex.test(email))
{
return true;
}
else
{      

document.getElementById("lblemail").innerHTML="email not valid";

return false;
}
}



No comments:

Post a Comment

ASPdotNET-Example