HTML DOM abbr 屬性
定義和用法
abbr 屬性可設(shè)置或返回表元中內(nèi)容的縮寫版本(針對非可視的媒介,比如語音和盲文)。
語法
tabledataObject.abbr=text
實例
下面的例子可提示某個單元格的 abbr:
<html>
<head>
<script type="text/javascript">
function alertAbbr()
{
alert(document.getElementById('td1').abbr
);
}
</script>
</head>
<body>
<table border="1">
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td id="td1" abbr="Some text">Peter</td>
<td id="td2">Griffin</td>
</tr>
</table>
<br />
<input type="button" onclick="alertAbbr()"
value="Alert abbr" />
</body>
</html>