Button Examples

Home

Some simple button examples:

<form>
  <input type="Button" value="View Source Code" onclick='window.location="view-source:"+window.location.href'>
</form>
 
<form>
  <input type="button" value="Close Window" onclick="window.close()">
</form>
 
<form>
  <input type="button" value="Close Window 2" onclick="self.close()">
</form>
 
<form>
  <input type="button" value="Click Here To E-Mail Me" onclick="parent.location='mailto:name@yourdomain.com'">
</form>
 
<form>
  <input type="button" value="Print This Page" onclick="window.print()">
</form>

Note: All of these may not work on Opera and I know how you guys/gals feel about this. I believe the print button and view source button are dysfunctional in Opera. They work fine in NN4+ and IE4+.