First: view-source method
View-source is a protocol that is basically supported by every browser in the early stage. But I don't know why. IE no longer supports this protocol since IE6 Beta2. This method can only be used in FireFox now!
Usage: Enter
View-source:
Press enter to view the source code of the webpage.
Method 2: JavaScript
This method does not seem generic either. It was successfully tested on IE6 and Opere browsers, but it was not successful on FireFox!
Usage: Enter
Copy codeThe Code is as follows: javascript: s0000document.doc umentElement. outerHTML; document. write ("<body> </body>"); document. body. innerText = s;
Press enter to view the source code of the webpage.
Method 3: Use vbscriptCopy codeThe Code is as follows: iLocal = "get.htm.txt"
IRemote = inputbox ("Enter the address you want to get the source code", "feet 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
Method 4: Use background languages such as asp and php
Some of the methods used are webmaster-level, so you can use the original method to get the code, there are a lot of scripts in the home.