Текст стирается по буквам, начиная с конца.
<script language=”JavaScript1.2″>
/********************************************************************************
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
Visit for more great scripts.
This may be used freely as long as this msg is intact!
********************************************************************************/
/*If you want the text to appear differently on another place on the page
or anything set that in the style tag of the zoom layer.
Here are the variables you have to set:
First the text:*/
text=”Ваш текст здесь”
//set the fontsize you want:
var fontsize=35
//The color of the text
var color=”#003300″
//the alignment of the text, you can choose center, right or left.
var align=”left”
//Set the speed you want it to write in (in milliseconds between each letter)
var Wspeed=100
//Set font
var font=’Arial Black,Arial,Helvetica’
//Set the time you want it to wait before it starts after pageload:
var timetowait=1000
/*You can remove this if you don’t wan’t it to start right away.
You can have it start if someone clicks a link (make a link like this:
<a href=”#” onclick=”writeInit()”>Click to writetext</a>)*/
onload=writeInit;
/*You shouldn’t really have to set anything below this point
****************************************************************************
****************************************************************************
*****************************************************************************/
/*Browsercheck and settings vars
****************************************************************************/
var ie, n;
if (document.all) {
n=0; ie=1
writeText=’document.all.divZoom.innerHTML=\'<p align=\”\’+align+\’\” style=\”font-family:\’+font+\'; font-size:\’+fontsize+\’px; color:\’+color+\'”>\’+text+\'</p>\”
closeIt=””
}
if (document.layers) {
n=1;ie=0
writeText=”document.divZoom.document.write(‘<p align=\”‘+align+’\” style=\”font-family:’+font+'; font-size:’+fontsize+’px; color:’+color+’\”>’+text+'</p>’)”
closeIt=”document.divZoom.document.close()”
}
/*The functions for writing text.
****************************************************************************/
function writeIt(){
if(text.length>0){
text=text.slice(0,text.length-1)
eval(writeText)
eval(closeIt)
setTimeout(“writeIt()”,Wspeed)
}
}
/*This is the functions that calls the right function…or something :}
****************************************************************************/
function writeInit(){
eval(writeText)
eval(closeIt)
if(ie || n) setTimeout(“writeIt(0)”,timetowait)
}
//***************************************************************************
</script>
</head>
<body bgcolor=”White”>
<div id=”divZoom” style=”position:absolute; top:1; left:1″></div>
Похожие записи
Нет комментариев