Page Opening AlertThis script will bring up a JavaScript alert when someone opens your Web page.Script CodeGrab a copy of the file below and place it in the same directory as the Web page on which you will use the script (if you wish to place the script file in a different directory you will need to make the necessary adjustments to the src attribute of the script tag that calls it).The code below should be placed between the <head> and </head> tags or between the <body> and </body> tags (probably near the opening <body> tag). ExampleA working sample of the script is shown below. Click the link to get the page with the alert.OptionsYou can change the text of the alert by opening the salert2.js file and editing the bold (strong) text on the following line of code:window.alert("Welcome to my Web Site!"); AccessibilityThis could possibly be made accessible by repeating the information in the alert someplace on the actual Web page. It would be redundant, but would provide the content for viewers with JavaScript off.It should be noted that this script can be quite irritating and probably should be avoided by professional sites unless absolutely necessary. |