edit div content ?

T

toto

hello

is there a way to edit the content of a div ? for instance to change :

<div>
foo
</div>

into

<div>
ree
</div>

thanks !
 
W

windandwaves

toto said:
hello

is there a way to edit the content of a div ? for instance to change :

<div>
foo
</div>

into

<div>
ree
</div>

thanks !

Here is an untested example. No idea if it is any good, but it will
probably work.

<div id="DivExample" onmouseover="show('DivExample', 'ree');"
onmouseout="show('DivExample', '&nbsp;');" >&nbsp;</div>

<script type="text/javascript><!--
function show (eln, msg) {
if(document.getElementById) {
var el = document.getElementById(eln);
el.innerHTML = msg;
return true;
}
return false;
}
//--></script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top