标签:rip today type page tutorial com index document als
We would like to know how to add days to current date.
<!--from w ww . j a v a2s . co m-->
<!DOCTYPE html>
<html>
<head>
<script type=‘text/javascript‘>
window.onload=function(){
var today = new Date();
var newdate = new Date();
newdate.setDate(today.getDate()+29);
document.writeln(newdate);
}
</script>
</head>
<body>
</body>
</html>
The code above is rendered as follows:
标签:rip today type page tutorial com index document als
原文地址:http://www.cnblogs.com/oxspirt/p/6935297.html