JavaScript » String » strike

Syntax:
object.'formatting_method'( )

This method displays the string using struck-out text, as if contained within HTML <STRIKE></STRIKE> tags.

There are various methods available that allow you to perform formatting alterations to the contents of your String object when written to a document. These methods are:

big, blink, bold, fixed, fontcolor, fontsize, italics, small, strike, sub and sup.

Examples

Code:
myString = new String("Formatting methods")
document.write ("<p>big() = " + myString.big())
document.write ("<br>blink() = " + myString.blink())
document.write ("<br>bold() = " + myString.bold())
document.write ("<br>fixed() = " + myString.fixed())
document.write ("<br>fontcolor("red") = " + myString.fontcolor("red"))
document.write ("<br>fontsize("5") = " + myString.fontsize("5"))
document.write ("<br>small() = " + myString.small())
document.write ("<br>strike() = " + myString.strike())
document.write ("<br>sub() = " + myString.sub())
document.write ("<br>sup() = " + myString.sup())
Output:
big() = Formatting methods
blink() = Formatting methods
bold() = Formatting methods
fixed() = Formatting methods
fontcolor("red")= Formatting methods
fontsize("5") = Formatting methods
small() = Formatting methods
strike() = Formatting methods
sub() = Formatting methods
sup() = Formatting methods
Explanation:

This code writes the contents of the "myString" String object to the document with a different formatting method applied each time it is written.