<head> <title>Динамическое изменение
заголовка окна и его статусной строки. </title>
<script language="JavaScript">
/*
Динамическое управление строкой состояния
Библиотека скриптов Юрия Сергеева <ysergeev@mail.ru>
*/
<!-- Начало
var hellotext="Пример динамического изменения
строки состояния окна."
var thetext=""
var started=false
var step=0
var times=1
function welcometext()
{
times--
if (times==0)
{
if (started==false)
{
started = true;
window.status = hellotext;
setTimeout("anim()",1);
}
thetext = hellotext;
}
}
function showstatustext(txt)
{
thetext = txt;
setTimeout("welcometext()",4000)
times++
}
function anim()
{
step++
if (step==7) {step=1}
if (step==1) {window.status='--> '+thetext+' <--'}
if (step==2) {window.status=' --> '+thetext+' <-- '}
if (step==3) {window.status=' --> '+thetext+' <-- '}
if (step==4) {window.status=' -->'+thetext+'<-- '}
if (step==5) {window.status=' --> '+thetext+' <-- '}
if (step==6) {window.status=' --> '+thetext+' <-- '}
setTimeout("anim()",200);
}
// Конец -->
</script>
<script language="JavaScript">
/*
Динамическое изменение заголовка окна
Библиотека скриптов Юрия Сергеева <ysergeev@mail.ru>
*/
<!--
welcometext();
//-->
</script>
<script><!--
var tit = document.title;
var c = 0;
function writetitle()
{
document.title = tit.substring(0,c);
if(c==tit.length)
{
c = 0;
setTimeout("writetitle()", 3000)
}
else
{
c++;
setTimeout("writetitle()", 200)
}
}
writetitle()
// -->
</script>
</head> |