SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member if foo's Avatar
    Join Date
    Mar 2003
    Location
    fooland
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Alert Box-Oine Breaks

    How do you create a line break in an alert box with JavaScript?

    Thank you.
    O see the happy moron,
    He doesn't give a damn;
    I wish I was a moron,
    My God,perhaps I am!

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the return character "\r".
    E.g.
    Code:
    window.alert('line1\rline2');

    Andy
    From the English nation to a US location.

  3. #3
    SitePoint Member if foo's Avatar
    Join Date
    Mar 2003
    Location
    fooland
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Andy.

    I had forgotten that little tip.
    O see the happy moron,
    He doesn't give a damn;
    I wish I was a moron,
    My God,perhaps I am!


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
  •