<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> JS自动滚屏程序 </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY style="background-color:#000000;color:#00FF00">
<center>
<div id="showContent" style="500px; height:500px">
<div>
</center>
</BODY>
</HTML>
<script>
function showText(){
try{
var parent = document.getElementById("showContent");
var objdiv = document.createElement("DIV");//创建DIV节点
var childDiv = parent.childNodes;
if(childDiv.length>20){
parent.removeChild(childDiv[0]);
}
objdiv.innerHTML = radn("<a href='http://www.my400800.cn
' titile='400电话
'>http://www.my400800.cn</a>",10);
parent.appendChild(objdiv);
setTimeout("showText()",10);
}catch(e){
alert(e.message);
}
}
//setInterval("showText()",100);
showText();
function radn(value,repCount){
if(repCount>0){
return radn(value+"__"+Math.floor(Math.random() * 10000),repCount-1);
}else{
return value;
}
}
</script>
效果图: