<script>
var d1=new Date("2005/02/28");
d1.setDate(d1.getDate()+1)
alert(d1);
</script>
var d1=new Date("2005/02/28");
d1.setDate(d1.getDate()+1)
alert(d1);
</script>
解决方案 »
- 得不到继承对象的属性
- JS如何获取参数问题
- javascript的函数思想是怎么样的啊?高手指教啊!怎么用一些dom?
- js导航问题,javascript能生成一个div吗?
- 请教:有什么方法用jQuery插件tooltip给图片增加提示?
- OWC中SpreadSheet单元格居中的问题
- 提问,救急,高手进,页面编辑模式下的光标问题,不会的帮忙顶啊
- 寻求JS帮助系统
- 简单问题--------------------------50分--------------------
- Microsoft JScript 运行时错误: 对象不支持此属性或方法
- Google地图API大家在网页上用过没有?我研究了一下,果然很Cool
- firefox下的一个问题,请教大家!
return new Date(this.valueOf()+n*3600*24*1000);
};
var d1=new Date("2005/02/28");
alert(d1.dateAdd(1))
function Date.prototype.toString(){
if((this.getMonth()+1)<parseInt(10))
{
var Month0="0"+(this.getMonth()+1);
}
else
{
var Month0=this.getMonth()+1;
}
if((this.getDate())<parseInt(10))
{
var date0="0"+this.getDate();
}
else
{
var date0=this.getDate();
}
return this.getFullYear()+"/"+Month0+"/"+date0;
} var d1=new Date("2005/02/28");
d1.setDate(d1.getDate()+1)
alert(d1);</script>
Date.prototype.Format = function(format)
{
var o = {
"M+" : this.getMonth()+1, //month
"d+" : this.getDate()+1, //day
"h+" : this.getHours(), //hour
"m+" : this.getMinutes(), //minute
"s+" : this.getSeconds(), //second
"q+" : Math.floor((this.getMonth()+3)/3), //quarter
"S" : this.getMilliseconds() //millisecond
} //author: meizz
if(/(y+)/.test(format)) format=format.replace(RegExp.$1,
(this.getFullYear()+"").substr(4 - RegExp.$1.length));
for(var k in o)if(new RegExp("("+ k +")").test(format))
format = format.replace(RegExp.$1,
RegExp.$1.length==1 ? o[k] :
("00"+ o[k]).substr((""+ o[k]).length));
return format;
};
alert(new Date().Format("yyyy-MM-dd"));
</script>===============================
CSDN小助手 是一款脱离浏览器也可以使用csdn论坛的
软件!
界面: http://qqwwee.com/
下载: http://qqwwee.com/csdn.rar 包含源代码