Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #19485
| From | "Tony" <tony.johansson@inport.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | about adding attribute class |
| Date | 2013-04-26 11:39 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <kldhrd$1t3$1@dont-email.me> (permalink) |
I just want to get a confirm if alternativ 1 and 2 is the same. It's just
two different ways to do the the same thing.
For me it's just the same thing and the result on screen is also the same.
alternative 1
**********
slot = document.createElement("div");
slot.className = "slot " + type;
alternative 2
slot = document.createElement('div');
slot.setAttribute('class', 'slot ' + type);
//Tony
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
about adding attribute class "Tony" <tony.johansson@inport.com> - 2013-04-26 11:39 +0200
Re: about adding attribute class "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-04-26 12:31 +0200
Re: about adding attribute class JJ <duh@nah.meh> - 2013-04-27 00:35 +0700
Re: about adding attribute class "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-04-26 21:01 +0300
csiph-web