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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to add text to javascript line

Status
Not open for further replies.

jojo79

Programmer
Oct 11, 2006
40
US
I have the following line which returns a value.

Code:
document.getElementById('qty').innerHTML = results[0];

I want to add the the word 'Total' so it will print out the word total and then the value.

i have tried with no luck

Code:
document.getElementById('qty').innerHTML = + 'total' + results[0];
 
No need for a + immediately after the = sign

Code:
document.getElementById('qty').innerHTML = 'total' + results[0];

[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top