function nowTime(){ var data= new Date(); var y=data.getFullYear(); var m=parseInt(data.getMonth())+1; var d=data.getDate(); var h=data.getHours(); var mi=data.getMinutes(); var s=data.getSeconds(); var si=data.getDay(); var arr=new Array("天",&q…
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…
网页上显示时间 代码如下: <TABLE> <TR> <TD><span id="localtime"></span> <script> function showLocale(objD) { var dn, str; var hh = objD.getHours(); var mm = objD.getMinutes(); var ss = objD.getSeconds(); str = (objD.getMo…