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);			
	}
}
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact