The first type: View-source method
View-source is a protocol that is essentially supported by every browser in the early days. But do not know what reason, from IE6 Beta2 after IE no longer support this agreement. This method can only be used in Firefox browser now!
How to: Enter in the browser address bar
View-source:
Return to see the source code of the Web page.
The second type: JavaScript method
This approach does not seem to be generic, it was successfully tested on IE6 and opere browsers, but it didn't work on Firefox browsers!
How to: Enter in the browser address bar
Copy Code code as follows:
Javascript:s=document.documentelement.outerhtml;document.write ("<body></body>"); Document.body.innertext=s;
Return to see the source code of the Web page.
A Third way: By using the VBScript method
Copy Code code as follows:
Ilocal= "Get.htm.txt"
Iremote=inputbox ("Please enter the address of the source you want to obtain", "cloud-dwelling community", "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 way: Through the background language asp,php, etc.
The use of some of these methods are some webmaster level, so we can use the original method of obtaining code, OH, here is not to give specific code, the specific code, cloud habitat there are many.