dcsimg

How do I access all elements of a certain type?

Chen Ming Yen

function setCheckBox(checked)
{
	var objEle = document.all.tags("input");
	for (var i=0;i<objEle.length;i++)
	{
		if(objEle[i].getAttribute("type") == 'checkbox')
			objEle[i].setAttribute("checked", checked);			
	}
}