text

English[tekst] American[t?kst]

n. テキスト、原文; テキスト、教科書; テーマ; バージョン

v .Texting

三人稱単數(shù): texts 複數(shù)形: texts 現(xiàn)在分詞: texting 過去形: texted

decoration

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

n. 裝飾; 裝飾、裝飾; 裝飾パターン、裝飾スタイル; メダル

複數(shù)形: 裝飾

javascript textDecoration屬性 構(gòu)文

機能: テキストを変更します。

構(gòu)文: 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>

インスタンスの実行 ?

[インスタンスの実行] ボタンをクリックしてオンライン インスタンスを表示します