You are here:   HomeJava ScriptJavascript StringJavaScript SubString
by Dinesh Thakur Category: Javascript String

JavaScript Blink Method: JavaScript Blink Method is used to display a specified string in blink tags. JavaScript Blink Method returns the string with the tag <BLINK> surrounding it, like this: <blink>string</blink>


Assuming you have assigned a string to a variable, you call these JavaScript Blink Method as follows:


You can see in the given example that we have used the JavaScript Blink Method that will display a blinking specified string.

1. Open a new HTML document in your preferred HTML or text editor.

2. Create the body of the document with opening and closing body tags:



3. Insert a script block in the body of the document:

<script language=”JavaScript”>


// -->


4. Create a variable named String_variable and assign the value “Hello JavaScript” to it:

 var String_variable = “Hello JavaScript”

5. Use the document.write method to display the value of the variable as altered by each of the formatting methods.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


<html xmlns="" xml:lang="en" lang="en">


<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

<title>JavaScript blink() method </title>



<h1 style="color: blue"> javascript blink()</h1>

<hr />

<script type="text/javascript">

var String_variable = "Hello JavaScript";







6. Open the file in a browser. You should see the text


displayed in blinking formatting as show below and in


<blink> Hello JavaScript <blink>

7. The Output of JavaScript Blink Method program is given Below

JavaScript Blink Method


About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.

What's New and Popular

Search Content

Advance Courses

Basic Courses

Advertise with Us