We would like to know how to find next 30 days.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
window.onload=function(){<!-- w ww .j a va2s . co m-->
var today = new Date();
var year = today.getFullYear();
var month = today.getMonth();
var date = today.getDate();
for(var i=0; i<30; i++){
var day=new Date(year, month - 1, date + i);
document.writeln(day);
document.writeln('<br/>');
}
}
</script>
</head>
<body>
<div></div>
</body>
</html>
The code above is rendered as follows: