How to create a blink text using JavaScript?

JavascriptWeb DevelopmentFront End Technology

To create a blinking text, use the JavaScript blink() method. This method causes a string to blink as if it were in a BLINK tag.

Note − HTML <blink> tag deprecated and is not expected to work in every browser.

Example

You can try to run the following code to create a blinking text with the JavaScript blink() method −

Live Demo

<html>
   <head>
      <title>JavaScript String blink() Method</title>
   </head>

   <body>
      <script>
         var str = new String("Demo Text");
         document.write(str.blink());
         document.write("<br><br> Note: HTML <blink> tag deprecated and is not expected to work in every browser.")
      </script>
   </body>
</html>
raja
Published on 18-Jan-2018 12:41:07
Advertisements