/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> var newDt = new Date(); document.writeln("<b>Current Date</b> :" + newDt + "<br/>"); // add 3 days to the current date newDt.setDate(newDt.getDate() + 3); document.writeln("<b>New Date</b> :" + newDt); </script>