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.
1 2 | < script src = "script.js" type = "text/javascript" ></ script > < h2 >Look at The Web Page Title to See Blinking</ h2 > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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.