字符在狀態(tài)欄中緩慢移動(dòng)
發(fā)布時(shí)間:2008-12-20 閱讀數(shù): 次 來(lái)源:網(wǎng)樂(lè)原科技
要完成此效果把如下代碼加入到區(qū)域中
<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 = "Welcome to JavaScript Fairyland";
if (wh_StatusType == "right") {
while (wh_StatusText.length < 80) wh_StatusText = " " +
wh_StatusText;
}
}
status = wh_StatusText;
setTimeout("wh_showStatus()",wh_StatusSpeed);
}
wh_StatusText = "Welcome to 細(xì) 溪 驛 站";
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>