//javascript.txt var scrtxt = "利伯宗洪世,仕文毓赐铸 " + "添 " + "经纶开国族,孝友振家声 " + "志父承祖德,绍箕继书香 "; var length = scrtxt.length; var width = 120; var pos = -(width + 2); function scroll(){ pos++ var scroller = ""; if(pos == length) {pos = -(width + 2);} 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); } document.frm9.txt9.value = scroller; setTimeout("scroll()",100); } function showtime(){ var now = new Date() var hours = now.getHours() var minutes = now.getMinutes() var seconds = now.getSeconds() var timeValue = "" + ((hours > 12) ? hours - 12 : hours) timeValue += ((minutes < 10) ? ":0" : ":") + minutes timeValue += ((seconds < 10) ? ":0" : ":") + seconds timeValue += (hours >= 12) ? " PM" : " AM" document.frm9.time.value = timeValue timerID = setTimeout("showtime()",1000) }