17、打印文字代码

17、打印文字代码

<!-- <body bgcolor="#fef4d9" OnLoad="textticker()">替换原有的<body> -->

<!--将以下代码加入HTML<Body></Body>之间-->

 

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var max=0;

function textlist() {

max=textlist.arguments.length;

for (i=0; i<max; i++)

this[i]=textlist.arguments[i];

}

tl = new textlist(

'所有被热烈浸透的夜晚','如此遥远的旋转','所有眼前的远去的黑暗','汇聚现在'

);

var x = 0; pos = 0;

var l = tl[0].length;

function textticker() {

document.tickform.tickfield.value = tl[x].substring(0, pos) + "_";

if(pos++ == l) {

pos = 0;

setTimeout("textticker()", 400);

if(++x == max) x = 0;

l = tl[x].length;

} else

setTimeout("textticker()", 200);

}

//  End -->

</script>

<form name=tickform>

<textarea name=tickfield rows=3 cols=38 style="background-color: rgb(0,0,0); color: rgb(255,255,255); cursor: default; font-family: Arial; font-size: 12px" wrap=virtual>cool

 

Write a comment

Comments: 0