How to avoid anchors in iframes to scroll parent page

后端 未结 6 2329
一向
一向 2021-02-13 03:54

So, here\'s the problem: I have a quite long page with an iframe in the middle. Now, if an anchor is clicked in the iframe, the entire page is scrolled to the iframe, which is w

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-13 04:00

    So you are telling that you want to move to a particular paragraph when clicked on the link which describes the link detail right?

    According to what I understand you can do like this.

    Click here
    

    Instead of Click here you can write Features, as of what I saw in http://jsfiddle.net/ymbV7/1/

    now to link to the place where it should move all you need to do is this:

    Linking Directly from Features

    To override this behaviour, certain standard techniques can be used. In particular, you will need to create named anchors in the body of the text at the point where you want to link to.

    "exactline" is the link name given to the para or heading you what to refer.

    It scrolls only the iframe and not the whole Page..

    refer this link for more clearance

    http://www.thesitewizard.com/html-tutorial/link-to-specific-line-or-paragraph.shtml

    I tried and it worked for me

提交回复
热议问题