[RESOLVED] Create Line Break Tag (<br>)
I am wanting to put a line break between dynamically inserted elements on a web page. Below is some sample code....
This works fine in FF and IE, but Chrome and Opera break when I try and create the <br> element (HELLO1 prints, but HELLO2 does not).
var myBr = document.createElement('<br>');
var myChangeText = document.createTextNode('Reason for Change: ');
Anybody know a better/cross-browser way to do this?
Use 'br', not '<br>', you specify the type of tag, not the full markup for the tag. Also, it worked fine your way in Opera here.
D'oh! That was it. Working in Chrome and Opera now.
Somehow I coudn't see the problem, even though within the same code I am also creating inputs which I did correctly.
Thanks a ton!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread