How do I load parent page with <iframe loading childB.html> from the grandchildren page
I have a parent.html, inside it, there was a iframe. When user tigger anchor link A or B, the iframe will load either childA.html or childB.htm开发者_JAVA百科l
And inside childB.html, there was a anchor link to grandchildren.html.
Currently my problem is, whenever I click the link at grandchildren.html to return to parent.html, iframe is showing childA.html
How should i do, if I want to show childB.html in iframe instead of showing childA.html
Thanks in advance
Kong
Add a parameter to your parent html. E.g., ?child=A. In the body stmt, add onload=init(). In the init() javascript, parse window.location.search looking for "child" and then do the same switching of the iframe source that you already do.
精彩评论