javascript textDecoration attribute
Translation results:
text
English[tekst] American[tɛkst]
n. Text, original text; text, textbook; theme; version
v .Texting
Third person singular: texts Plural: texts Present participle: texting Past tense: texted
decoration
英[ˌdekəˈreɪʃn] 美[ ˌdɛkəˈreʃən]
n. Ornament; decoration, decoration; decorative pattern, decorative style; medal
Plural: decorations
javascript textDecoration attributesyntax
Function: Modify the text.
Syntax: Object.style.textDecoration=none|underline|overline|line-through|blink
javascript textDecoration attributeexample
<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>
Run instance »
Click the "Run instance" button to view the online instance