SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    line breaks in input buttons?

    hi, im trying to find a way to include a line break in my button, something like:

    <input name="registered" type="submit" value="Registered\nNumber" />

    where '\n' should be the line break. is this possible?
    if not, ill use text instead, but i need the code to work if javascript is turned off. i thought that if js was enabled then it would execute the onclick command, if it wasnt then it would take the href command....

    <a href="number.asp?id=1" onclick="submit()">Registered<br />Number</a>

    but it always seems to execute whats in the href tag regardless of wether js is enabled or not. can anyone shed light on this? thanks.

  2. #2
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML Code:
    <button type="submit">Registered<br>Number</button>
    Simon Pieters

  3. #3
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    excellent, thanks a lot!!!!!!!!!!!!!!!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •