className

Discussion in 'Javascript' started by Aaron Gray, Jul 13, 2008.

  1. Aaron Gray

    Aaron Gray Guest

    Okay, onto className and the HTML class attribute.

    When was className introduced, I believe it was introduced by Microsoft,
    although I could be wrong. Now I also believe that Mozilla added support for
    'className' at some point in Geko's life time, but when ?

    Now the really horribly funny thing is when using getAttribute() and friends
    IE only works with 'className' where as FF only works with 'class'. Funny
    funny behaviour, I don't say.

    Anyone educate me thurther with some details ?

    Many thanks in advance,

    Aaron

    P.S. I could not find anything in the FAQ or any other good standard
    informative source, but I maybe wrong.
    Aaron Gray, Jul 13, 2008
    #1
    1. Advertising

  2. Aaron Gray

    Aaron Gray Guest

    "Aaron Gray" <> wrote in message
    news:...
    > Okay, onto className and the HTML class attribute.
    >
    > When was className introduced, I believe it was introduced by Microsoft,
    > although I could be wrong. Now I also believe that Mozilla added support
    > for 'className' at some point in Geko's life time, but when ?


    Woopse its a W3C DOM construct !

    > Anyone educate me thurther with some details ?


    Anyone know with which browsers Geko and IE introduced it ?

    I am wondering if we have to use get/setAttribute() with older browsers at
    all ?

    Does the behaviour need lifting, or can we just use the className object
    attribute for all baseline browsers ? By baseline I mean all browsers
    supporting Javascript 1.5/ ECMAScript 3/ JScript 5.5 ?

    Aaron
    Aaron Gray, Jul 13, 2008
    #2
    1. Advertising

  3. Aaron Gray wrote:
    > Okay, onto className and the HTML class attribute.
    >
    > When was className introduced, I believe it was introduced by
    > Microsoft, although I could be wrong.


    IE 4 had calssName properties on its elements, Netscape 4 did not. I
    have never seen and IE 3 in the flesh so I don't know anything about its
    object model (and couldn't care less at this point).

    > Now I also believe that Mozilla added support for 'className' at some
    > point in Geko's life time, but when ?


    Pre-release Mozzlia browsers had className properties on its elements
    (including at least 0.9 to my certain knowledge), as did Netscape 6
    browsers. (there were no Netscape 5 browsers)

    <snip>
    > P.S. I could not find anything in the FAQ or any other good
    > standard informative source, but I maybe wrong.


    The HTML DOM is the only standard relevant to className properties.

    Richard.
    Richard Cornford, Jul 13, 2008
    #3
  4. Aaron Gray

    Guest

    , Jul 15, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman

    className Attribute (UserControls)

    Charles A. Lackman, Jul 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    403
    Charles A. Lackman
    Jul 8, 2003
  2. noname

    global.asax classname

    noname, Jul 16, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    357
    Graham
    Jul 16, 2003
  3. Oliver S.

    classname::classname a type ?

    Oliver S., Sep 11, 2003, in forum: C++
    Replies:
    1
    Views:
    482
    White Wolf
    Sep 11, 2003
  4. Hongzheng Wang
    Replies:
    32
    Views:
    853
  5. Ante Perkovic

    CSS: "tagname.classname" or ".classname"

    Ante Perkovic, Dec 22, 2003, in forum: Javascript
    Replies:
    2
    Views:
    94
Loading...

Share This Page