![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hello is there a way to edit the content of a div ? for instance to change : div foo /div into div ree /div |
#3
| |||
| |||
|
|
"toto" <toto (AT) chaos (DOT) ko> wrote in message news an.2005.08.31.09.26.52.315592 (AT) chaos (DOT) ko...[quoted text muted] div id="foo" Donald Duck /div script type="text/javascript" foo = document.getElementById('foo'); foo.removeChild(foo.childNodes[0]); var newtext = document.createTextNode("Mickey Mouse"); foo.appendChild(newtext); /script |
#4
| |||
| |||
|
|
hello is there a way to edit the content of a div ? for instance to change : div foo /div into div ree /div thanks ! |
#5
| |||
| |||
|
|
document.all.pens.innerHTML = words; |
|
foo.appendChild(newtext); |
|
I'm no expert, that's just a way that I found when I was looking to do the same thing... it seems simpler, but is there anything technically better for doing it either way? |
![]() |
| Thread Tools | |
| Display Modes | |
| |