Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript strike() Method

JavaScript strike() Method

String Object Reference JavaScript String object


Definition and Usage

The strike() method is used to display a string with a strikethrough.

This method returns the string with an tag added, as shown below:

string

Syntax

string

.strike()


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the strike() method.


Example

Example

Use a strikethrough to display the string:

Try it »


String Object Reference JavaScript String object