setAttribute

It seems that Internet Explorer and Netscape have wildly different ways of
using this method.  I would like to know which is correct... or at least
more correct.

As an example, in IE you would set an attribute as such:

x.setAttribute("className","myclass")

but in Netscape you would do something like:

x.setAttribute("class","myclass")


It appears that Netscape works of the string and applies the matching
attribute, whereas Internet Explorer looks for a matching JS method??

I'm confused, please help.  :)


-Peter

Received on Thursday, 14 December 2000 14:42:11 UTC