Blinking Title using JavaScript
![]() |
| javascript flash title bar |
Today We will learn How to Blinking Title using JavaScript.
Create two files named:
1.index.html
2.script.js
Now copy the Below Codes for Certain files.
<script src="script.js" type="text/javascript"></script> <h2>Look at The Web Page Title to See Blinking</h2>
function titlebar(val)
{
var msg = "Wellcome to Our Website--MegaTech24";
var speed = 500;
var pos = val;var msg1 = "$$$ "+msg+" ******";
var msg2 = "------- "+msg+" -------";if(pos == 0)
{
masg = msg1;
pos = 1;
}
else if(pos == 1)
{
masg = msg2;
pos = 0;
}
document.title = masg;
timer = window.setTimeout("titlebar("+pos+")",speed); }
titlebar(0);
Now run the Index.html page and Look at The Title on Browser Tab.


No comments:
Post a Comment
Thank You for Your Comment
Note: Only a member of this blog may post a comment.