87,997
社区成员




jQuery(function () {
var jq = jQuery.noConflict();
function current() {
var d = new Date();
var week;
if (d.getDay() == 0) week = "星期日"
if (d.getDay() == 1) week = "星期一"
if (d.getDay() == 2) week = "星期二"
if (d.getDay() == 3) week = "星期三"
if (d.getDay() == 4) week = "星期四"
if (d.getDay() == 5) week = "星期五"
if (d.getDay() == 6) week = "星期六"
str = "";
str += week;
str += "(";
str += d.getMonth() + 1 + "-";
str += d.getDate() - 4;
str += ")";
return str;
}
setInterval(function () {
jq("#flash .left_t .time .box ul").find("label").html(current(), 1000);
});
});
str += d.getDate() - 4;
为毛这一句获取到的是3
setInterval(function () {
jq("#flash .left_t .time .box ul").find("label").html(current(), 1000);
});
setInterval(function () {
jq("#flash .left_t .time .box ul").find("label").html(current()),1000 });
setInterval(function () {
jq("#flash .left_t .time .box ul").find("label").html(current(), 1000);
});
为什么你能运行成功,我也不懂....难道不应该是
setInterval(function () {
jq("#flash .left_t .time .box ul").find("label").html(current()),1000 });
而且 你今天发帖是1号,那么按照你上面的逻辑 1-4难道不是等于-3吗
-3 然后跟你前面的12- 连起来就是12--3 中间有两个“--” 所以你看错了吧
[/quote]
恩 对 是-3 那么这样的话 就是11月28号 这样我要如何判断呢[/quote]
setInterval(function () {
jq("#flash .left_t .time .box ul").find("label").html(current(), 1000);
});
为什么你能运行成功,我也不懂....难道不应该是
setInterval(function () {
jq("#flash .left_t .time .box ul").find("label").html(current()),1000 });
而且 你今天发帖是1号,那么按照你上面的逻辑 1-4难道不是等于-3吗
-3 然后跟你前面的12- 连起来就是12--3 中间有两个“--” 所以你看错了吧
[/quote]
恩 对 是-3 那么这样的话 就是11月28号 这样我要如何判断呢 function getymd(sj){
var arr = ["日","一","二","三","四","五","六"];
return "星期"+arr[sj.getDay()]+"("+(sj.getMonth()+1)+"-"+sj.getDate()+")";
}
var t = new Date();
alert(getymd(t));
t.setDate(t.getDate() - 4);
alert(getymd(t));
setInterval(function () {
jq("#flash .left_t .time .box ul").find("label").html(current(), 1000);
});
为什么你能运行成功,我也不懂....难道不应该是
setInterval(function () {
jq("#flash .left_t .time .box ul").find("label").html(current()),1000 });
而且 你今天发帖是1号,那么按照你上面的逻辑 1-4难道不是等于-3吗
-3 然后跟你前面的12- 连起来就是12--3 中间有两个“--” 所以你看错了吧