W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

setAttribute

From: Peter Benoit <pbenoit@triton-network.com>
Date: Thu, 14 Dec 2000 08:48:49 -0500 (EST)
Message-ID: <309828428FB7D411A53C00508BB18D261CC3BC@triton.triton-network.com>
To: "'www-dom@w3.org'" <www-dom@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT