text

英 [tekst]? ?美 [t?kst]??

n.文本,原文;課文,教科書;主題;版本

v.發(fā)短信

第三人稱單數(shù): texts 復(fù)數(shù): texts 現(xiàn)在分詞: texting 過去式: texted

decoration

英 [?dek??re??n]? ?美 [?d?k??re??n]??

n.裝飾品;裝飾,裝潢;裝飾圖案,裝飾風(fēng)格;獎(jiǎng)?wù)?/p>

復(fù)數(shù): decorations

javascript textDecoration屬性 語法

作用:對(duì)文本進(jìn)行修飾。

語法:Object.style.textDecoration=none|underline|overline|line-through|blink

javascript textDecoration屬性 示例

<html>
<head>
    <meta charset="UTF-8">
<script type="text/javascript">
function setTextDecoration()
{
document.getElementById("p1").style.textDecoration="overline";
}
</script>
</head>
<body>

<p id="p1">This is an example paragraph.</p>
<p>給文本添加下劃線</p>
<input type="button" onclick="setTextDecoration()"
value="Set text-decoration" />

</body>
</html>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例