text

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

n.文本,原文;課文,教科書(shū);主題;版本

#v .傳簡(jiǎn)訊

第三人稱(chēng)單數(shù): texts 複數(shù): texts 現(xiàn)在分詞: texting 過(guò)去式: texted

decoration

#英[?dek??re??n]? ?

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

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

javascript textDecoration 屬性 語(yǔ)法

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

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

javascript textDecoration 屬性 範(fàn)例

<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>

執(zhí)行實(shí)例 ?

點(diǎn)擊 "執(zhí)行實(shí)例" 按鈕查看線上實(shí)例