⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 script.js

📁 lynda.com 2007年出品的javascript essential training教学视频(Dori Smith主讲)的配套源码。
💻 JS
字号:
window.onload = showTheTime;function showTheTime() {	var now = new Date();	var theTime = showTheHours(now.getHours()) + showZeroFilled(now.getMinutes()) + showZeroFilled(now.getSeconds()) + showAmPm();	document.getElementById("showTime").innerHTML = theTime;	setTimeout("showTheTime()",1000);		function showTheHours(theHour) {		if (theHour == 0) {			return 12;		}		if (theHour < 13) {			return theHour;		}		return theHour-12;	}		function showZeroFilled(inValue) {		if (inValue > 9) {			return ":" + inValue;		}		return ":0" + inValue;	}		function showAmPm() {		if (now.getHours() < 12) {			return " am";		}		return " pm";	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -