Wednesday, October 6, 2010

JavaScript function to check/Uncheck all the check boxes on a form

function CheckAll(flag) {
var fmobj = document.friendbox;
for (var i=0;i {
var e = fmobj.elements[i];
if(e.type=='checkbox')
{
if(flag=='false')
e.checked = false;
else
e.checked = true;
}
}
}

No comments: