Home  >  Article  >  Backend Development  >  跳转到指定位置

跳转到指定位置

WBOY
WBOYOriginal
2016-06-23 13:22:121368browse

a.php<script>    function GoEvent(){        parent.location.href = "event.php";    }</script>event.php...$tpl->display('event.html');event.html <li></li> <li></li> <li></li> <li></li> <li></li> <li id="1"></li>


...event.html#1   可以跳到

  •  位置

    现在我想通过GoEvent();跳到event.html 这个位置

  • 这代码要怎么写?


    回复讨论(解决方案)

    parent.location.href = "event.php #1";

    又被火狐坑了一次,页面当前数据不是最新的.
    设置成隐私模式还会这样.google还不错

  • 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