add following code in head of source
<script language="javascript" type="text/javascript">
var rev = "fwd";
function titlebar(val) {
var msg = 'Welcome Naween';
var res = " ";
var speed = 100;
var pos = val;
//msg = " |--- " + msg + " ---|";
var le = msg.length;
if (rev == "fwd") {
if (pos < le) {
pos = pos + 1;
document.title = msg.substring(0, pos);
timer = window.setTimeout("titlebar(" + pos + ")", speed);
}
else {
rev = "bwd";
timer = window.setTimeout("titlebar(" + pos + ")", speed);
}
}
else {
if (pos > 0) {
pos = pos - 1;
var ale = le - pos;
document.title = msg.substring(ale, le);
timer = window.setTimeout("titlebar(" + pos + ")", speed);
}
else {
rev = "fwd";
timer = window.setTimeout("titlebar(" + pos + ")", speed);
}
}
}
titlebar(0);
</script>
No comments:
Post a Comment