Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I am doing it wrong in JavaScript

Name: Anonymous 2006-06-12 13:43

Yeah, JS is a scripting language and not a programming language, whatever. Anyway, I've got a page where the script does the following a couple of times:

var i = document.createElement('div');
i.innerHTML = 'some text';
i.class = 'some CSS class';
document.getElementById('element already in the page').appendChild(i);

Name: Anonymous 2006-06-13 8:52

sinced nobody answered >>1
the problem is that 'className' is the attribute you want to use for CSS classes. 'class' is not mapped to the html attribute, for retarded reasons (is it a keyword? javascript doesn't fucking have classes!)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List