View source code with a button

Submitted by:David Villa

Date added:25 March, 2012

Category:JavaScript

when clicked on button it will open your source code

Tags: view code

Code Snippet:

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

Comments