html <a name> 属性无效
html <a name> attribute not working
为了能够跳转到某个 table 行,我在每个 table 行之前添加了一个属性。但是,在添加
时,我无法跳转到 table 行
http://server/test.php#row-92
给我的 url。 table 行是这样构建的
<a name="row-92"></a><tr onclick="document.location ..... </tr>
您应该使用 id 属性。从 HTML5 开始,a-name 标签已弃用。
<tr id="row-97" onclick="document.location ..... </tr>
为了能够跳转到某个 table 行,我在每个 table 行之前添加了一个属性。但是,在添加
时,我无法跳转到 table 行http://server/test.php#row-92
给我的 url。 table 行是这样构建的
<a name="row-92"></a><tr onclick="document.location ..... </tr>
您应该使用 id 属性。从 HTML5 开始,a-name 标签已弃用。
<tr id="row-97" onclick="document.location ..... </tr>