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>