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

inserting html into...

Status
Not open for further replies.

Extras

Technical User
Nov 16, 2001
232
US
I currently have a script statment as follows:

document.write(opentags+dday+ " D: "+dhour+" H: "+dmin+" M: "+dsec+" seconds until "+occasion+closetags)

I would like the display of dday dhour dmin and dsec to be in bold. How can I do that?

TIA!
 
document.write(opentags+&quot;<strong>&quot;+dday+&quot;</strong>&quot;+&quot; ...)

 
[tt]document.write(opentags+ '<span style=&quot;font-weight:bold;&quot;>' + dday + '</span>' + &quot; D: &quot;+ '<span style=&quot;font-weight:bold;&quot;>' + dhour + '</span>' +&quot; H: &quot;+ '<span style=&quot;font-weight:bold;&quot;>' + dmin + '</span>' +&quot; M: &quot;+ '<span style=&quot;font-weight:bold;&quot;>' + dsec + '</span>' +&quot; seconds until &quot;+occasion+closetags)[/tt]
 
either way.

Of course, with dwarf's method you could make a class instead of just style=bold and then make them look however you want.
 
And with Nevermoor's method you can redefine the strong identifier and make it look however you want. And get the bonus of less typing :)
 
either method should get you on your way
[auto]
(while we are breaking out the smileys)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top