Can someone please tell me how to insert a carriage return and linefeed into an alert message so that I can space the message out?
Thanks.
Can someone please tell me how to insert a carriage return and linefeed into an alert message so that I can space the message out?
Thanks.
There's no need to use CRLF; Javascript uses UNIX-style linebreaks (only CR), which are far more logical, if you ask me:
Code:window.alert("Hello\nWelcome to my site");
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks