facebook twitter youtube
in JavaScripts - 19 Apr, 2014, This Tutorial Has Been Viewed 2,040 Times.
by admin - no comments
View webpage source using javascript
VN:F [1.9.22_1171]
Rating: 7.0/10 (1 vote cast)

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!" />
<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;

This script will work on Mozilla and Chrome. IE hate this script :P 
VN:F [1.9.22_1171]
Rating: 7.0/10 (1 vote cast)
View webpage source using javascript, 7.0 out of 10 based on 1 rating

coded by nessus

Leave a Reply

Please support the site
By clicking any of these buttons you help our site to get better