Welcome and Alert Messages

The following script will allow you to place a welcome message like the one that appeared on this page (assuming your JavaScript is enabled).  These alert messages can be used almost anywhere with any event to welcome visitors, give them new information, or to help direct them to other pages.


  • Place the following script between the <head> tags of your HTML:

<script language="JavaScript">
<!--
function welcome( )
{
alert("Welcome to the 95Net Support pages.")
}

function welcome2( )
alert("Create alert messages anywhere, anytime!")
}
//-->
</script>

<body onload="welcome( )">

<form><input type="button" value="Click Here!" onclick="welcome2( )"></form>

  • It's very important not to break a line in a welcome or alert message.  In other words, when typing in the message itself (the red text), do not hit enter.  Rather, keep typing on one line until the end.
  • It's also important to note that since you are using double quotes outside the message, you must use a backslash in front of apostrophes and quotes (e.g, don\'t, \"special\", etc.)
  • You can create multiple messages in the head portion of your HTML and then call them up anywhere, such as with a button.

Back to Web Tips