Home > Article > Web Front-end > Control page navigation through iframe? _html/css_WEB-ITnose
I have a page main.htm, which has a button, and there is an iframe in main.htm. ifame loads a page index.htm, now I want to ask, I want to click the button, the iframe will What about automatically navigating to the label location ? Thanks!
Attached are the simple contents of the two pages:
main.htm
index.htm
..... (Due to limited content, the following information is omitted)
ffff
Can be solved by anchor point
ffff
Click the button onclick="window.frames[0].location.href='index.htm#ff'"
You can also use scripts
Can be solved by anchor point
ffff
Click Button onclick="window.frames[0].location.href='index.htm#ff'"
You can also use scripts
Thank you for your answer. The requirements now are a little different, main. The iframe in htm loads different pages at different times, such as a.htm, b.htm, c.htm, etc. Can my COMMAND button in main.htm directly find different pages according to the different pages loaded? What about an element with ID FF and navigating to that location? Thanks for answering again!
Make it clearer, but it’s not too clear.
Make it clearer, but it’s not too clear.
Thanks in advance, I have found the answer.