js时间函数
代码
<script type="text/javascript">
var currDate = new Date();
currDate.setFullYear(currDate.getFullYear()-10);
alert(currDate.getMonth() +"/"+currDate.getDate()+"/"+currDate.getFullYear());
</script>
var currDate = new Date();
currDate.setFullYear(currDate.getFullYear()-10);
alert(currDate.getMonth() +"/"+currDate.getDate()+"/"+currDate.getFullYear());
</script>