function clrCtrls()
{with(document.forms[0])
{
for(var i=0; i < elements.length; i++)
{
var e = elements[i];
if(e.type == "checkbox" e.type == "radio" ){e.checked = false;}
if(e.type == "text" e.type == "hidden"){e.value = "";}
if(e.type == "select-one"){e.selectedIndex = 0;}
}
}
return false;
}
Call This Fuction From any Event = "return clrCtrls()";
IE/Firefox Supproted
No comments:
Post a Comment