scroller.html
来自「javascript中文教程 <INPUT TYPE="butto」· HTML 代码 · 共 34 行
HTML
34 行
<html>
<head>
<script language="JavaScript">
<!-- Hide
var scrtxt="怎 麽 样 ! 很 酷 吧 ! 您 也 可 以 试 试."+"Here goes your message the visitors to your page will "+
"look at for hours in pure fascination...";
var lentxt=scrtxt.length;
var width=100;
var pos=1-width;
function scroll() {
pos++;
var scroller="";
if (pos==lentxt) {
pos=1-width;
}
if (pos<0) {
for (var i=1; i<=Math.abs(pos); i++) {
scroller=scroller+" ";}
scroller=scroller+scrtxt.substring(0,width-i+1);
}
else {
scroller=scroller+scrtxt.substring(pos,width+pos);
}
window.status = scroller;
setTimeout("scroll()",150);
}
//-->
</script>
<body onLoad="scroll();return true;">这 里 可 显 示 您 的 网 页 !
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?