Javascript Alert Snippets


25 March, 2012   

JavaScript Codes to show alert box on mouse over

23 May, 2011   

Are you looking for an easy way to launch an alert box on mouse over? This script will do just that. This JavaScript provides an easy way to alert your visitors. However, please ensure you use this script cautiously, as you certainly don't want to irritate your visitors and cause them to leave your web site.

23 March, 2011   

Are you looking for an easy way to launch an alert box on mouse over? This script will do just that. This JavaScript provides an easy way to alert your visitors. However, please ensure you use this script cautiously, as you certainly don't want to irritate your visitors and cause them to leave your web site.

02 February, 2011   

Basic Alert

03 April, 2011   

Often when working on scripts alert boxes are placed inside loops as a debugging tool. You can sometimes end up with hundreds of alert boxes and no way to stop them. This script placed at the start of your code will give you an option to disable the alert boxes after a pre-determined number set by you.

11 February, 2012   

JavaScript Code to show a message box or a alert window when page opens

17 November, 2012   

JavaScript code example for converting a string to all upper or lowercase

22 September, 2012   

Javascript code to convert a string to all upper or lowercase

13 August, 2011   

Although there really isn't any foolproof way to protect your web page content, this JavaScript will discourage the more novice Internet users from copying your content. An alert box will appear displaying your copyright information when the right mouse button is clicked. However, this script will not completely protect your content from more...

10 April, 2012   

Protect your web page content with JavaScript code

JavaScript Code example to protect Your Web Page Content

Most today's web browsers like Firefox (Ctrl+D), Opera (Ctrl+T) and IE (Ctrl+D) provide a keyboard shortcuts to enable users bookmark their favorite pages. But if you want to provide your visitors with a "Bookmark this page" link they can click you may use the code below: It works in IE, FireFox and Opera. Clicking on the link prompts...

Get number of paragraphs in column 2 and display that number in an alert box. Including the one in the red box.

Detect Javascript On/Off, With Notification: If JavaScript is on the user gets a welcome message. If off, the user is instructed to turn it on.

Sometimes you have some information on your page and your visitors might want to copy it. The easiest way is to provide a mechanism that allows them to simply click a button to do so. You have to paste this code into the head of your web page:

26 November, 2018   

Cross-browser method for testing for pop-up blockers.

04 July, 2012   

Good programmer comments their code so that anyone can know what is happening in code. Its easy for others to edit the code.

23 May, 2018   

Add to bookmarks bar, select text, click it to get the word count.

09 July, 2013   

Copy selected text by allowing user to simply click a button

Confirm a deletion (or any action) with Javascript.