Home > Web Front-end > JS Tutorial > body text

IE view-source cannot view the source code JavaScript view web page source code [original]_javascript skills

WBOY
Release: 2016-05-16 18:49:41
Original
1676 people have browsed it
The first method: view-source method
View-source is a protocol. In the early days, basically every browser supported this protocol. But for some unknown reason, IE no longer supports this protocol since IE6 Beta2. This method can now only be used on the FireFox browser!
How to use: Enter
in the browser address bar view-source:
Press Enter to see the source code of the web page.
The second method: JavaScript method
This method does not seem to be universal. It was successfully tested on IE6 and Opera browsers, but not on FireFox browser!
How to use: Enter

javascript: s=document.documentElement.outerHTML;document.write("");document.body.innerText=s;

Press Enter to view Go to the source code of the web page.
Third method: Copy the code through vbscript method
Copy the code The code is as follows:

iLocal="get.htm.txt"
iRemote=inputbox("Please enter the address where you want to get the source code", "Script Home", "http://www.jb51.net")
if iRemote="" then iRemote="http://www.baidu.com"
Set xPost=createObject("Microsoft.XMLHTTP")
xPost.Open "GET",iRemote,0
xPost.Send()
set sGet=createObject("ADODB.Stream")
sGet.Mode=3
sGet.Type=1
sGet.Open()
sGet. Write xPost.ResponseBody
sGet.SaveToFile iLocal,2

The fourth method: through the background language asp, php, etc.
Use some of these methods They are all at the webmaster level, so you can use original methods to obtain codes. Haha, I won’t give the specific codes here. There are many specific codes in Script Home.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!