Javascript examples for DOM HTML Element:S
The S object represents an HTML <s> element.
You can access a <s> element by using getElementById():
<!DOCTYPE html> <html> <body> <p><s id="myS">My car is blue.</s></p> <button onclick="myFunction()">set the color of the s element</button> <p id="demo"></p> <script> function myFunction() {//from w w w. j a v a2s.c om var x = document.getElementById("myS"); x.style.color = "red"; } </script> </body> </html>