The parent window refreshes the child window and the child window refreshes the parent window's JS.

time:17-05-01 forum:HTML web page, JS language and code
  http://www.cnblogs.com/wubin264/archive... 94267.html

a problem today is that the main menu is placed in a iframe surface, and the link is controlled by the current page. The links to face are shown in red. But when you click on the parent window to change the contents of main, the links in iframe remain unchanged. At first, you want to judge by the content of the content display area, but immediately the consciousness does not work, and then want to link the links between the parent window and the child window, which is still very troublesome. Finally, when you think of the link to the parent window, the content of the content display area changes, then the state of the child window should be the state of the loading time, as long as it is refreshed.

search online immediately, the result is very disappointed, the search is the child window to refresh the parent window JS, but no parent window refreshes the JS code of the child window. Then I thought about it. - the parent window refresh the child window, is not the link that changes SRC is OK? Immediately start, the effect immediately came out, on the two line of code, simple to you can not believe it!

[code]/*
zdz works,
*/

function reloadleft () {
var leftiframeid = =; Go into onclick=.quot; reloadleft ().Quot; it's OK.

[code].lt; a href=.quot; contact.html.quot; target=.quot; main.quot; title=.quot; click View.Quot; onclick=.quot; reloadleft (). The window refreshes the js

[code]self.opener.location.reload () () of the parent window;

window.opener.location.reload (); / / / / key is this: refresh the parent window [/code]
  • 2
  • 3

prev:Disabled children, compulsory education,... next:Ji'nan: there are swindlers who defraud ...
post comment
Notice



approved   Friends who like to go to the fair o...   The origin of the streets and lanes ...   Ji'nan municipal government web site...   Commonly used URLs for elderly peopl...   Ji'nan social insurance and professi...
rand   JavaScript timing display ad code sh...   960gs tips- assists designers to cre...   Comparison and analysis of JavaScrip...   Random display ad code   Floating framework for website custo...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com