Cracking the Baidu framework

Source: Internet
Author: User

From: http://www.cnblogs.com/yvesliao/articles/855989.htmlSocansoft [Liao yongjun's DOTNET blog]

 

When I write a program, I Want To embed it into my blog. I am from Baidu. I find that the framework cannot be used. It will automatically fill the screen and find that the source file contains this section:

If (top. location! = Self. Location ){
Top. Location = self. location;
}

This is the code that is forcibly disabled by the Framework. After the search result is obtained, you only need to add <SCRIPT> var location = ''; </SCRIPT>!

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> cracking the Baidu framework </title>

<SCRIPT> var location = ''; </SCRIPT>

</Head>
<Frameset rows = "50px, *" border = "0px">
<Frame src = "Top. aspx"> </frame>
<Frameset Cols = "120px, *">
<Frame src = "menu. aspx"> </frame>
<Frame name = "Main" src = "http://hi.baidu.com/yvesliao/blog/item/2834bbde558e605594ee370d.html"> </frame>
</Frameset>
</Frameset>
<Noframes>
Your browser does not support frame web pages!
</Noframes>
</Html>

 

[Analysis: the reprinted article solves the problem that the entire browser will be forcibly occupied when the Baidu page is embedded into the development page. The principle is to define a location variable on the framework page, when the Baidu page calls top. location is no longer the address pointing to the upper page, but a custom variable. Therefore, the upper page will not be refreshed as Baidu page because the address is changed.]

 

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.