<h1 id="p1" onmouseover="ad_underline()" onmouseout="de_line()" onclick="ad_overline()" ondblclick="ad_throughtline()">
示例文字
</h1>
<script>
function ad_underline(){
p1.style.textDecoration = 'underline';
}
function de_line(){
p1.style.textDecoration = 'none';
}
function ad_overline(){
p1.style.textDecoration = 'overline';
}
function ad_throughtline(){
p1.style.textDecoration = 'line-throught';
}
</script>
还有请问一下 我明明是换行的 发出了为啥就没有换行了
你的双击事件在哪??
你的属性名写错了,是line-through,不是line-throught,你多了一个t在后面