69、字符慢慢右移

69、字符慢慢右移

脚本说明:

把如下代码加入<head>区域中

<SCRIPT LANGUAGE="javascript">

function wh_showStatus(){

  if (wh_StatusType == "left") {

    wh_StatusText = " " + wh_StatusText;

  }

    else

  if (wh_StatusType == "right") {

    wh_StatusText = wh_StatusText.substring(1,wh_StatusText.length);

  }

  if (wh_StatusText == "" || wh_StatusText.length > 80) {

    wh_StatusText = "…………网络编程欢迎您…………";

    if (wh_StatusType == "right") {

      while (wh_StatusText.length < 80) wh_StatusText = " " + wh_StatusText;

    }

  }

  status = wh_StatusText;

  setTimeout("wh_showStatus()",wh_StatusSpeed);

}

wh_StatusText = "…………网络编程欢迎您…………";

wh_StatusSpeed = 1000;

wh_StatusType = "left";

if (wh_StatusType == "right") {

  while (wh_StatusText.length < 80) wh_StatusText = " " + wh_StatusText;

}

setTimeout("wh_showStatus()",wh_StatusSpeed);

</SCRIPT>

 

Write a comment

Comments: 0