页面上打字效果输出的文字

下面是效果

 

你只需将下列代码加入到你网页<body>的后面即可实现这个效果.....

<p id='anima' style="position:absolute;font-size:14;background-color:#000066; color=#ffff00; left: 185px; top: 245px; width: 407px; height: 107px">
</p>
<SCRIPT LANGUAGE="JavaScript">
text="  本站郑重声明,本站的各种网页制作设计特效均由站长收集整理,大部分来自于互联网。现在大约有一百多种,且正在不断增加,如果有牵涉到版权问题的,请速以邮件方式告知站长。联系信箱:E-mail:xuelijun@etang。com,本站将立即删除相关信息。谢谢您的合作!!!   2001年11月30日 站长:
word = text.split('.')
i = -1;
j = 0;
start = 0;
scount = 0;
function checkIt() {
with(document.all.anima) {
if(innerText.charAt(innerText.length-1) == "_") {
innerText = innerText.substring(0, innerText.length - 1);
return true;
}
else {
innerText = innerText + "_";
return false;
}
}
}
function blinkfor(count, timing) {
with(document.all.anima) {
if(start < count) {
if(checkIt()) {
start++;
}
mistake = 'blinkfor('+count+','+timing+')';
setTimeout('eval(mistake)', timing);
}
else {
start = 0;
i++;
call_It();
}
}
}
function mispell(offset,correction) {
with(document.all.anima) {
if(scount < offset) {
if(!checkIt()) {
innerText = innerText.substring(0, innerText.length-2) + "_";
scount++;
}
mistake = 'mispell(' + offset + ', "' + correction + '")';
setTimeout("eval(mistake)", 150);
}
else {
if(correction == '' && scount == offset ) {
i = i - offset;
scount++;
}
if(offset > 0) {
if(checkIt()) {
innerText += correction.charAt(correction.length - offset) + "_";
offset--;
}
mistake = 'mispell(' + offset + ',"' + correction + '")';
setTimeout("eval(mistake)", 150);
}
else {
scount = 0;
j++;
innerText = innerText.substring(0, innerText.length - 1);
call_It();
}
}
}
}
function spellit(string) {
with(document.all.anima) {
if(i <= string.length) {
if(string.charAt(i) == '/') {
NumErrs = string.charAt(i + 1);
NewLets = string.substring(i + 2, i + NumErrs);
mispell(NumErrs,NewLets);
}
else if(i <= string.length - 1) {
i++;
innerText = string.substring(0,i) + "_";
mistake = 'spellit("' + string + '")';
setTimeout("eval(mistake)", 150);
}
else {
innerText = string.substring(0, i);
j++;
call_It();
}
}
}
}
function call_It() {
with(document.all) {
if(i == -1){
blinkfor(4, 150);
}
else if(j <= word.length - 1) {
spellit(anima.innerText + " " + word[j]);
}
else {
blinkfor(100,230);
}
}
}
if(document.all) {
call_It();
}
</script>


看看上面的效果是不是好酷,想学吗?把代码加进去就可以了,呵呵!!!蓝色的文字你可以改成你自己的文字,绿色的部分可以修改文字的大小,橙色的部分可以修改文字的背景,粉色的部分可以修改文字的颜色.在此希望你可以给本站做链接,谢谢!!!

关闭这个窗口