锚元素在 html 中不起作用
Anchor element not working in html
我必须完成一个我已经很久没做的项目 ;-)
从那时起,我们从使用 firefox 更改为 chrome。
现在。我有一个 table 并且每个 table 行都有一个自己的锚点,允许我跳转到特定的行。这段代码曾经有效,但似乎发生了一些变化。
<a name="row-36"></a><tr onclick="document.location = ....
我也试过了
<div id="row-36"></div><tr onclick="document.location =
但是当我从 link 调用那个锚点时,页面总是跳到中间
http://server/index.php#row-36
有什么想法吗? chrome 是否以不同方式对待这些锚点?
<a>
和 <div>
都不能是 <tr>
的兄弟元素。
如果你想link变成<tr>
,那么link就变成。给 <tr>
一个 id
.
我必须完成一个我已经很久没做的项目 ;-) 从那时起,我们从使用 firefox 更改为 chrome。
现在。我有一个 table 并且每个 table 行都有一个自己的锚点,允许我跳转到特定的行。这段代码曾经有效,但似乎发生了一些变化。
<a name="row-36"></a><tr onclick="document.location = ....
我也试过了
<div id="row-36"></div><tr onclick="document.location =
但是当我从 link 调用那个锚点时,页面总是跳到中间
http://server/index.php#row-36
有什么想法吗? chrome 是否以不同方式对待这些锚点?
<a>
和 <div>
都不能是 <tr>
的兄弟元素。
如果你想link变成<tr>
,那么link就变成。给 <tr>
一个 id
.