一.在<head></head> 之间写入下面js代码 <script type="text/javascript" language="JavaScript"> var timerID = null var timerRunning = false function MakeArray(size) { this.length = size; for (var i = 1; i <= size; i++) { this[i]…
<script type="text/javascript"> function show_cur_times(){ //获取当前日期 var date_time = new Date(); //定义星期 var week; //switch判断 switch (date_time.getDay()){ case 1: week="星期一"; break; case 2: week="星期二"; break; case 3: week…
//获取动态时间function mytime() { var mydate = new Date(); var year = mydate.getFullYear(); var month = mydate.getMonth() + 1; var day = mydate.getDate(); var hour = mydate.getHours(); var minutes = mydate.getMinutes(); var now=""; if(minutes < 10)…
今天研究了下js动态加载js文件和css文件的方法. 网上发现一个动态加载的方法.摘抄下来,方便自己以后使用 [code lang="html"] <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Javascript includes - ready state and onload</title><…
1.js获取系统时间格式为YYYY-MM-DD HH:MM:SS 1 function curDateTime(){ 2 var d = new Date(); 3 var year = d.getYear(); 4 var month = d.getMonth()+1; 5 var date = d.getDate(); 6 var day = d.getDay(); 7 var hours = d.getHours(); 8 var minutes = d.getMinutes(); 9 v…