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
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.