Subhash Sharma

Subhash Sharma
Subhash Sharma

This is Subhash Sharma(Software Engineer) Blog

Welcome to this blog and find every solution.............

Search This Blog

Software Engineer(Subhash Sharma)

Software Engineer(Subhash Sharma)
Software Engineer

Friday, March 12, 2010

Validate the contorl in java script

function Validate()
{
if (document.getElementById("Name").value == "") //"Name" == it is a control Id
{
alert("Please enter name");
return false;
}

if (document.getElementById("address").value == "")
{
alert("Please enter Address");
return false;
}
if (document.getElementById("contactno").value == "")
{
alert("Please enter contact no");
return false;
}
if (document.getElementById("query").value == "")
{
alert("Please enter Query");
return false;
}
return true;

}

No comments:

Post a Comment