JavaScript View Source Script


This script will show you the HTML source code of a page by the click of a button.

(Does not work in IE)






Script Source


<The Form >

<INPUT TYPE="button" value="Try it! Click Here" onClick="getcode()">


<The JavaScript >

<script type="text/javascript">
function getcode()
var thecode= "view-source:" + window.location;
window.location= thecode;

Please let me know if this script was helpful to you.