3、状态栏闪烁文字
把以下代码放在<head></head>之间:
<script>
var yourwords = "Welcome to Ahao'HomePage";
var speed = 300;
var control = 1;
function flash()
{
if (control == 1)
{
window.status=yourwords;
control=0;
}
else
{
window.status="";
control=1;
}
setTimeout("flash()",speed);
}
</script>
把以下代码放在<body>tag:
<body onLoad="flash()">
4、编辑框滚动文字
把以下代码放在<head></head>之间:
<script language="JavaScript">
<!-- Hide
var timerID = null;
var timerRunning = false;
var id,pause=0,position=0;
function ticker() {
var i,k,msg="YOUR MESSAGE GOES HERE";
k=(30/msg.length)+1;
for(i=0;i<=k;i++) msg+=" "+msg;
document.form2.ticker.value=msg.substring(position,position+30);
if(position++==38) position=0;
id=setTimeout("ticker()",1000/10); }
function action() {
if(!pause) {
clearTimeout(id);
pause=1; }
else {
ticker();
pause=0; } }
//-->
</script>
把以下代码放在<body>中:
<body onLoad="ticker()">