解决方案 »
- 关于在.net邮件服务器连接问题
- count()函数用ExecuteScalar执行时,查到的数据库中记录数怎么像是随机数啊,
- asp.net中如何取得客户端文件目录?
- (急急急!!!在线等!)帮我看看好吗?各位大哥大姐,小弟asp.net新手!请看:http://admin.edushi.com/cityERP/Login.aspx
- ~~~生成静态html的出问题了~~~
- DataSet 的WriteXml方法写道xml 文件.能否在xml里把xslt写进去?
- 如何在指定位置 用代码(c#)添加删除控件?
- Repeter 按钮取值
- 图片按纽(runat=server)默认回车执行,思归等前面所给的方法好象无效
- 新手问题。。我这个怎么不行呢?没反应
- 求教
- 博客列表和相册的实现?
<script type="text/javascript">
function fresh() {
var d = "2014-05-25";
var endtime = new Date(d);
var nowtime = new Date();
var leftsecond = parseInt((endtime.getTime() - nowtime.getTime()) / 1000);
d = parseInt(leftsecond / 3600 / 24);
h = parseInt((leftsecond / 3600) % 24);
m = parseInt((leftsecond / 60) % 60);
s = parseInt(leftsecond % 60);
var td = d * 24 + h;
$("#emH").html(td);
$("#emM").html(m);
$("#emS").html(s);
if (leftsecond <= 0) {
$("#emH").html("00");
$("#emM").html("00");
$("#emS").html("00");
clearInterval(sh);
}
}
fresh();
var sh;
sh = setInterval(fresh, 1000);
</script><div class="hd">
<div class="floatleft clock">
<em id="emH"></em> <strong>:</strong><em id="emM"></em><strong>:</strong><em id="emS"></em>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
givetime();
})
var endtimes = new Array();//结束时间
var nowtimes;
function givetime() {
endtimes[0] = document.getElementById("times0").attributes["data"].nodeValue;
endtimes[1] = document.getElementById("times1").attributes["data"].nodeValue;
endtimes[2] = document.getElementById("times2").attributes["data"].nodeValue;
endtimes[3] = document.getElementById("times3").attributes["data"].nodeValue;
var myDate = new Date();
var month = myDate.getMonth() + 1;
nowtimes = new Date(month + "/" + myDate.getDate() + "/" + myDate.getFullYear() + " " + myDate.getHours() + ":" + myDate.getMinutes() + ":" + myDate.getSeconds());//当前服务器时间
window.setTimeout("DownCount()", 1000)
}
function DownCount() {
nowtimes = Number(nowtimes) + 1000;
for (var i = 0; i <= 3; i++) {
var theDay = new Date(endtimes[i]);
theDay = theDay++;
if (theDay <= nowtimes) {
document.getElementById("times" + i).innerHTML = "限购时间:抢购已结束";
}
else {
timechange(theDay, i); }
}
window.setTimeout("DownCount()", 1000)
}
function timechange(theDay, i) {
var theDays = new Date(theDay);
var seconds = (theDays - nowtimes) / 1000;
var minutes = Math.floor(seconds / 60);
var hours = Math.floor(minutes / 60);
var days = Math.floor(hours / 24);
var CDay = days;
var CHour = hours % 24;
var CMinute = minutes % 60;
var CSecond = seconds % 60;
var CHour = CHour + CDay * 24;
if (CMinute < 10) {
CMinute = "0" + CMinute;
}
if (CHour < 10) {
CHour = "0" + CHour;
}
if (CSecond < 10) {
CSecond = "0" + CSecond;
}
document.getElementById("times" + i).innerHTML = "限购时间:" + CHour + "小时" + CMinute + "分钟" + CSecond + "秒";
}
</script>for (int k = 0; k < kcount; k++)
{
sbnew.Append("<p><div class = \"daojishi\" style=\"float:left;\"><div id = \"times" + k + "\" data= \"" + ("04/30/2014,23:30:00") + "\" style=\"float:left;\"></div></div><br></p>");
}
我这样做的