|Web Hosting Wit.Com
Webhosting, Server and Web Site Help & Information
Comments are programmers notes, so that you or another programmer can understand how your code was scripted. Always make good use of comment tags and programmers notes, because you may have to read this code again years from now when updating the site. There are two different kinds of comment tags you may use.
/* This set of tags with a forward slash and
asterisk may be used to comment out multiple lines. */
// The dual forward slashes are for single line comments.
<a href="http://www.webhostingwit.com" onmouseover="window.status='Learn About Java'; return true;" onmouseout="window.status=' '; return true;">
The onclick command sets your browser to submit a form when a button is clicked. The history.go( ) command sets your browser to go forward or back a predetermined number of pages in your browser history. Typically we use this to send a visitor back to the page they came from. A good application for this would be on a shopping cart if the visitor wanted to check the contents of the cart and then be returned back to the item they were looking at. Try the example below.
<form><input type="button" value="Go Back" onclick="history.go(-1);return true;"></form>
var firstname = prompt("Please Enter Your First Name", "" );
document.write( "Hello " +firstname );
Pop Up Window Scripts are great for login boxes, banner ads, shipping information and more. For this pop up window script you will have to create a page to open in the window, example: banner1.html. We just used our web hosting page for our example.
<a href='#' onClick="window.open('index.html','','width=640,height=520,menubar=no,scrollbars=yes,resizeable=no');">Click Here For More Information</a>Click below to try this example.
Click Here For More Information
This is the same pop up window script using a form button to open the window instead of a link.
If you have any programming tips, information, or scripts you would like to add to the site e-mail it to firstname.lastname@example.org