js入门实例
2017-02-27 本文已影响3人
东方常德
var msg = "开始第二天的学习!";
var interval = 30;
seq = 0;
function Scroll() {
var len = msg.length;
//window.status = msg.substring(0, seq + 1);
window.status = "msg.substring(0, seq + 1);"
window.status = msg.substring(0, seq + 1);
seq++;
if (seq > len) {
seq = 0
};
window.setTimeout("Scroll();", interval);
}