Javascript examples for CSS Style Property:textDecoration
Return the text decoration of a <p> element:
<!DOCTYPE html> <html> <body> <p id="myP" style="text-decoration:line-through;">This is an example paragraph.</p> <button type="button" onclick="myFunction()">Return text decoration of p</button> <script> function myFunction() {/*from www. j a v a2 s.c o m*/ console.log(document.getElementById("myP").style.textDecoration); } </script> </body> </html>