Re: Change the same span element all the time
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Change the same span element all the time

From: RobG <rgqld@iinet.net.au>
Date: Sat Apr 29 2006 - 13:54:25 CEST

Ronaldo Junior wrote:
> You don't need to replace the entire element to chance its text. Use
> the innerText property to modify it:

What are you replying to? Please don't top-post in this newsgroup.

> var newSpan = document.createElement("FirstNameLengthLabel");
> newSpan.innerText = "New label text";

Why use an IE proprietary method when standards compliance is no more
difficult and ensures support for a much wider variety of browsers?

[...]

-- 
Rob
Received on Mon May 1 05:26:48 2006