Latest web development tutorials

JavaScript strike () method

String Object Reference JavaScript String Object

Definition and Usage

strike () method strikethrough string for display.

This method returns a string plus <strike> tag, as follows:

<Strike> string </ strike>

grammar

string.strike()


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support strike () method


Examples

Examples

Use strikethrough to display the string:

<script>

var str = "Hello world!";
document.write(str.strike());

</script>

try it"


String Object Reference JavaScript String Object