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>
如對本文有疑問,請?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會為你解答?。?點(diǎn)擊進(jìn)入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號