
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
How to create a strikethrough text using JavaScript?
To create a strikethrough text with JavaScript, use the strike() method. This method causes a string to be displayed as struck-out text as if it were in a <strike> tag.
Example
You can try to run the following code to create a strikethrough text −
<html> <head> <title>JavaScript String strike() Method</title> </head> <body> <script> var str = new String("Demo Text"); document.write(str.strike()); alert(str.strike()); </script> </body> </html>
- Related Articles
- How to create a bold text using JavaScript?
- How to create a blink text using JavaScript?
- How to mark strikethrough text in HTML?
- How to create a small font text using JavaScript?
- How to create a big font text using JavaScript?
- How to create a link from a text using JavaScript?
- Strikethrough text with CSS
- Display strikethrough text in HTML
- How to create a text field using JavaFX?
- How to create a canvas with Text using FabricJS?
- How to make a text italic using JavaScript
- How to create a canvas with text cursor using FabricJS?
- How to create Text Split effect using CSS?
- How to Create and Save text file in JavaScript?
- How to create a Text with dash pattern border using FabricJS?

Advertisements