1. Link to a page
<input type="button" name="Submit" value="OK"
onclick="location.href='filename.html'" />
2. Return (equivalent to retreat)
<input name="Submit2" type="button"
onclick="location.href='javascript:history.go(-1);'" value="Return" />
3. Open a new web page
<input type="button" name="Submit2" value="OK"
onclick="window.open('filename.html')" />
4. Open a new window without borders
<input type="button" name="Submit2" value="OK" onclick="javascript:window.open('filename.html','','width=720,height=500,resizable=yes,scrollbars= yes,status=no')" />
5. Open a new web page while pointing to another page
<input type="button" name="Submit2" value="OK" onclick="window.open('filename.html');location.href='http://www.cxybl.com'" />
6. Open a new window without borders while pointing to another page
<input type="button" name="Submit2" value="OK" onclick="javascript:window.open('http://www.cxybl.com','','width=720,height=500, resizable=yes,scrollbars=yes,status=no'); window.location='filename.html';" />
7. Click the button to pop up the confirmation alert window.
Method one:
<input type="button" name="Submit1" value="OK"
onClick="alert('Confirm submission?');location.href= 'filename.html';return false;" >
Method two:
<input type="button" name="Submit2" value="OK"
onClick="if (confirm('Confirm submission?'))location.href= 'filename.html';return false;" >