Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display page source code using javascript

Status
Not open for further replies.

WRFan

Technical User
Joined
Jul 14, 2002
Messages
14
Location
DE
how can I display the source code of the page using javascript? I want to make a link so that if someone clicks on it the source code of the page is opened, just as if one would click on source code in the IE options
 
Code:
<a href=&quot;#&quot; onClick=&quot;location.href='view-source:'+location.href;return false&quot;>Source Code</a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top