E-Mail 当您单击该链-6ren">
gpt4 book ai didi

javascript - 刷新页面并调用相同的 anchor

转载 作者:行者123 更新时间:2023-11-27 23:44:32 25 4
gpt4 key购买 nike

在我的一个 Bootstrap 选项卡中,我插入了一个 HTML 表格。单击 <th> 时,有一个排序功能可以对所有结果进行排序。标签。

现在这是其中一个链接:

<th><a href="#customers?sort-by=email&order='. $this->order .'">E-Mail</a></th>

当您单击该链接时,它基本上应该刷新页面,但由于 anchor #customers 而不会刷新。 .当我删除 #customers从链接中,它将刷新页面,但未显示正确的选项卡。

知道如何刷新并停留在页面的同一选项卡/ anchor 上吗?

最佳答案

<th><a href="?sort-by=email&order'. $this->order .'#customers">E-Mail</a></th>

关于javascript - 刷新页面并调用相同的 anchor ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30495101/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com