Home  >  Article  >  Web Front-end  >  Control page navigation through iframe? _html/css_WEB-ITnose

Control page navigation through iframe? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:24:431319browse

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



Reply to the discussion ( Solution)

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn