Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set the content of a span or div

Status
Not open for further replies.

mattquantic

Programmer
Mar 28, 2004
196
GB
Hi Can I use the following to set the content of a span or div:

document.getElementsByName("thesubtotal").innerHTML =Total;

with

<span id="thesubtotal"></span>

M@?
 
No what you need to use is

document.getElementById("thesubtotal").innerHTML = Total;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top