Single Line JavaScript

Web programming topics
Post Reply
Tony
Lieutenant
Lieutenant
Posts: 86
Joined: Tue Jul 21, 2009 4:11 pm

Single Line JavaScript

Post by Tony » Sun Nov 29, 2009 5:14 am

Fot a multi-line alert, use "\n" for a the line break.

Code: Select all

alert ('This is line one\nThis is line two');  
If you want to test your website in different resolutions make a bookmark (or favorite) with the following as the link or location.

Code: Select all

javascript:resizeTo(800,600);  
Ensure your page is not opened in a frame by putting this JavaScript in the head section of your page

Code: Select all

if (top.location != self.location) { top.location.href = self.location.href; } 
Post Reply

Return to “Web programming”