Javascript examples for String:strike
The strike() method displays a string that is struck out.
This method returns the string embedded in the <strike> tag, like this:<strike>string</strike>
None.
A string embedded in the <strike> tag
The following code shows how to Display a struck-out string:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from w w w . java 2 s . c om var str = "Hello World!"; var result = str.strike(); document.getElementById("demo").innerHTML = result; } </script> </body> </html>