JavaScript: Multiline Alert
Tip by Progger99 | Last update on 2024-01-17 | Created on 2011-11-24
Sometimes, you may want to insert a new line in a JavaScript alert and make the alert multiline with this.
Here is how to do it:
alert('1\n2\n3');
The \n stands for a linebreak. In the example, the alert() creates an output of the numbers 1, 2 and 3 under each other.
About the Author
The author has not added a profile short description yet.
Show Profile
Related Topics
How to Replace multiple Texts at the same Time
Tutorial | 0 Comments
Rewrite Text Files with a fixed Line Length
Tutorial | 0 Comments
How to resize Image before Upload in Browser
Tutorial | 13 Comments
Delphi: Multiline Caption for TLabel (at Run Time and Design Time)
Tutorial | 1 Comment
PHP: Sending an E-Mail
Tutorial | 0 Comments
Repair Text Files with mixed Line Breaks
Tutorial | 0 Comments
Windows Batch Script: Computer Shutdown
Tutorial | 2 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.