devxlogo

Scripting All the Elements of a Particular Kind Using DOM

Scripting All the Elements of a Particular Kind Using DOM

In DOM compliant browsers (IE5 & NS6), you can handle attributes of all similar elements with the getElementByTagName() function. For example, to change the background color of all the cells in a table you can use the following script:

 

devx-admin

Share the Post: