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

what's the command in javascript for a line break

Status
Not open for further replies.

DrAsh

Technical User
May 3, 2001
46
US
I want to split text in a javascript write command. Currenlty it says

document.writeln (&quot;<font size=3 face='Arial Black' color=003399> Congratulations &quot;+whatName+&quot;!&quot;)

i want it to print whatname on the next line, not hte same.


 
since you are really writing HTML here, just use <br>> tag. In textareas, etc, to force a line break use \n>

document.writeln (&quot;<font size=3 face='Arial Black' color=003399> Congratulations<br> &quot;+whatName+&quot;!&quot;) jared@eae.net -
 
Try adding &quot;\n&quot; to the string where you want it to break. If that doesn't work, try adding &quot;<br>&quot;. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
the first part of my last post should look like:

since you are really writing HTML here, just use <br> tag. In textareas, etc, to force a line break use \n
jared@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top