Mel wrote:
can someone post a simple javascript to change the text of the <href>
for me ?
thanks
<html>
<head>
<style type="text/css">
a {display: block; font: 500% tahoma; color: crimson;}
</style>
<script type="text/javascript">
function setLinkText(sLink_id, sText)
{
var el;
if (document.getElementById
&& (el = document.getElementById(sLink_id))
|| document.all
&& (el = document.all[sLink_id]))
{
while (el.hasChildNodes())
el.removeChild(el.lastChild);
el.appendChild(document.createTextNode(sText));
}
}
onload = function()
{
setTimeout("setLinkText('foo1', 'zippity');", 2000);
setTimeout("setLinkText('foo2', 'doo');", 3000);
setTimeout("setLinkText('foo3', 'dah !');", 3500);
}
</script>
</head>
<body>
<a id="foo1" href="#">z</a>
<a id="foo2" href="#">d</a>
<a id="foo3" href="#">d</a>
</body>
</html>