IE View-source can't check the source code JavaScript look at the source code [original]_javascript Tips

Source: Internet
Author: User
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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.