Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Comparing Strings


  • From: wdlists at triche-osborne.com (Triche Osborne)
  • Subject: [Javascript] Comparing Strings
  • Date: Thu Aug 25 08:51:38 2005

Timothy White wrote:
> 
> So what should I use instead of innerHTML?
> 

Kinda depends on how your XHTML is structured, but let's say you have a 
DIV, thus:

<div id="replaceThis">Text to be replaced.</div>

You'd do something like:

var replacementText = "Hi there!";
var theNode = document.getElementById(nodeId);
theNode.firstChild.data = replacementText;

Triche