html <a name=""> attribute not working

时间:2016-03-05 15:13:06

标签: html attributes anchor

To be able to jump to a certain table row, I add an attribute before each table row. however, I cannot jump to the table row, when adding a

http://server/test.php#row-92

to my url. The table row is built like that

<a name="row-92"></a><tr onclick="document.location ..... </tr>

1 个答案:

答案 0 :(得分:1)

您应该使用id-attribute。从HTML5开始,不推荐使用a-name标记。

<tr id="row-97" onclick="document.location ..... </tr>