looking for a simple way to enable your visitors to view your source code,
code to your web site, you can create a button that, when clicked on, will
open your source code.
This script is useful for sites that are teaching any type of web design
coding and need an easy way for their visitors to view their source
Copy and paste
this code into your HTML where you would like the button to appear:
<input type="button" value="View Source"
onClick= 'window.location = "view-source:" + window.location.href' >