Some times you need that some of the html text blinks on the browser again and again without using any kind of picture or image so to add this functionality with the JavaScript we can use simple blink() method. We have used the method blink() of string.
Syntax :
| String_Object.blink(); |
Description of example :
In this example we have created a simple html page and in JavaScript we have created a string object which contains the string "Welcome to Roseindia" , which will blink on the browser by calling the blink() method on the string's object.
blinkExample.html
<html> <head> <title>Javascript blink</title> <script> var str="Welcome to Roseindia"; document.write(str.blink()); </script> </head> </html> |
Output:


If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: JavaScript blink method
Post your Comment