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