Applies to: String Object
The Strike method places HTML <STRIKE> tags around text in a String object.
Syntax
strVariable.strike( )
"String Literal".strike( )
Example
The following example demonstrates how the strike method works:
<HEAD> <SCRIPT LANGUAGE="JavaScript"> function strikeTag() { var strVariable = "This is string object"; strVariable = strVariable.strike( ); return strVariable; } </SCRIPT></HEAD> <BODY> <P> See how it work in Html <SCRIPT LANGUAGE="JavaScript"> document.write(strikeTag());</SCRIPT></P> </BODY>
|
To run the code, paste it into JavaScript Editor, save as htm file format and click the Show Internal View button.
See also: String Object methods, String Object properties |