次のボタンで装飾を順番に変更します
この文字列にテキスト装飾を付ける
![]()
<style TYPE="text/css"><!--
@import url("../style1.css");
H3.und {text-decoration:underline}
H3.ove {text-decoration:overline}
H3.lin {text-decoration:line-through}
H3.all {text-decoration:
underline
overline line-through}
--></style>
<script language="JavaScript"><!--
var n = 1;
var timerID;
function TextDeco(){
if(n == 1)sp.style.textDecoration = "none";
if(n == 2)sp.style.textDecoration = "underline";
if(n == 3)sp.style.textDecoration = "overline";
if(n == 4)sp.style.textDecoration = "line-through";
if(n == 5)sp.style.textDecoration =
"underline overline line-through";
n ++;
if(n > 5)n = 1;
timerID = setTimeout("TextDeco()",1000);
}
//--></script>
</head>
<body>
<h3 class="header">text-decoration(テキスト装飾)</h3>
<h3 class="und">下線を付ける</h3>
<h3 class="ove">テキスト上部に線を付ける</h3>
<h3 class="lin">打ち消し線を付ける </h3>
<h3 class="all">下線、上部線、打消し線を付ける</h3>
<h3 style="text-decoration:none">
"none"を指定した<H3>タグ</h3>
<p>次のボタンで装飾を順番に変更します
<button onclick="TextDeco();">テキスト装飾</button>
<button onclick="clearTimeout(timerID);">停止</button>
</p>
<span id="sp" style="color:red;font:16pt MS 明朝">
この文字列にテキスト装飾を付ける</span>
END(99/8/21)