jQuery实现时间功能! 在一个div中,显示当前时间,比如:2012年3月6日 13:24:36用jQuery如何实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $(document).ready(function(){ var timezone = "Asia//Chongqing"; $.getJSON("http://json-time.appspot.com/time.json?tz="+timezone+"&callback=?", function(data){ alert(data.datetime); var getDate=new Date(data.datetime); alert(getDate); });}); var date = new Date(); var s = date.getFullYear()+"年"+date.getMonth()+"月"+date.getDate()+"日 "+date.getHours()+":"+date.getMinutes() $("#div1").html(s) setInterval(function () { var date = new Date(); var s = date.getFullYear() + "年" + date.getMonth() + "月" + date.getDate() + "日 " + date.getHours() + ":" + date.getMinutes() $("#div1").html(s) },1000) 补充一下.. $(document).ready(function () { setInterval(function () { var date = new Date(); var s = date.getFullYear() + "年" + date.getMonth() + "月" + date.getDate() + "日 " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds() $("#div1").html(s) }, 1000) }); 楼主可以自己写个方法去判断。。if....else 别人写的总是别人写的,对吧 报表erp,asp.net ASP HTML控件 table表格 怎么有效使表格里面的控件在IE运行后还是保持不变呢 高手帮我看下!!! js高手请问:关于用js动态给div加入事件的方法。 在ASP.NET中如何操作.dbf表 日历控件一显示出来就和其他控件重叠,有什么办法解决?我是初学. .net初学者的几个问题。 常数中有换行符 高分求助SQLSERVER 连接问题 请教关于"System.IO" 图片上传后改变其格式 下面的结构如何写sql语句
$(document).ready(function(){
var timezone = "Asia//Chongqing";
$.getJSON("http://json-time.appspot.com/time.json?tz="+timezone+"&callback=?",
function(data){
alert(data.datetime);
var getDate=new Date(data.datetime);
alert(getDate);
});
});
var s = date.getFullYear()+"年"+date.getMonth()+"月"+date.getDate()+"日 "+date.getHours()+":"+date.getMinutes()
$("#div1").html(s)
var date = new Date();
var s = date.getFullYear() + "年" + date.getMonth() + "月" + date.getDate() + "日 " + date.getHours() + ":" + date.getMinutes()
$("#div1").html(s)
},1000)
setInterval(function () {
var date = new Date();
var s = date.getFullYear() + "年" + date.getMonth() + "月" + date.getDate() + "日 " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds()
$("#div1").html(s)
}, 1000)
});
楼主可以自己写个方法去判断。。if....else
别人写的总是别人写的,对吧