月份参数应该传平常说的月份减1的值,即:
var date=new Date(2006,2,31);//2006年3月31日
var date=new Date(2006,2,31);//2006年3月31日
解决方案 »
- onmouseup和onmousedown注册事件失败!
- 如何获取这个div里面的所有ID
- extJs 3.0获取不到值问题
- jquery autocomplet实现类似百度google的搜索如2345.com 或hao123.com的百度搜索框
- 网站链接问题?
- javascript 没有权限
- 这是我见过的最牛逼的JS效果!!!!
- 困惑了一晚上了。如何获取动态生成的Items的数量,获取的items的数量总是原来的值,为什么不是动态生成后的值呢?
- 在聊天室里,如何清除别的框中的屏?
- 请教一个Node.JS问题:multipart模块parser() 方法报错
- 页面自动跳转
- 奉献给大家一个JavaScript类——slcDragWindow
Date.prototype.toString=function(){
return (this.getMonth()+parseInt(1))+"/"+this.getDate();
}
var a=new Date();
alert(a)
</script>