Facebook Twitter Reset

This Tutorial Has Been Viewed 1,317 Times.

View webpage source using javascript

If  you wanna see your webpage source using javascript here is  a simple example just copy and paste the script below to your webpage and press the View Source button.

<form action="#" onsubmit="return getsource();">
<input type="submit" value="View Source!" />
</form>
<script type="text/javascript" >
function getsource()
{
 var thesource= "view-source:" + window.location;
 window.open(thesource, 'source_code', 'width=400, height=400, resizable=1, scrollbars=1');
 return false;
}</script>

This script will work on Mozilla and Chrome. IE hate this script :P 

VN:F [1.9.13_1145]
Rating: 7.0/10 (1 vote cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)
View webpage source using javascript, 7.0 out of 10 based on 1 rating

Incoming search terms:




You will also be interested in ,

No comments yet.

Leave a Comment

Spam protection by WP Captcha-Free

Affordable Seo PackagesSeo BlogEdu Backlinks
More in JavaScripts, Tools (84 of 96 articles)