Codesupplier.com

free html codes for your website

View source code button

If you want a simple way for your users to access your source code this Javascript is for you. When clicked on this code accesses the html that makes the your page up and displays it to your users. This code is useful if you are trying to teach html.

If you want to use this html code simply copy and paste the html below.

 

<form>
<input type="button" value="View Source"
onClick= 'window.location = "view-source:" + window.location.href' >
</form
>

 

< Go Back to Javascript Snippets