JavaScript blink method

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.

JavaScript blink method

JavaScript blink method

     

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:

Download Source Code