rctek
Programmer
- May 8, 2009
- 4
Hi all,
I'd like to add some html to the top of the body tag. I was thinking something like this snippet below.
However, the commented out line adds it to the html tag inbetween the head and body and the next line doesn't work
Any ideas what I need to do to make it work?
Thanks in advance.
Regards,
Richard
I'd like to add some html to the top of the body tag. I was thinking something like this snippet below.
However, the commented out line adds it to the html tag inbetween the head and body and the next line doesn't work
Code:
var bnrContent = "";
var bnrLink = "";
var bnrContentHTML = "";
var bnr = document.createElement('div');
bnr.setAttribute('id', 'openPropBnr');
//document.childNodes[1].appendChild(bnr);
document.getElementsByTagName('body').appendChild(bnr);
Any ideas what I need to do to make it work?
Thanks in advance.
Regards,
Richard