<div id="date">
<script>
newDate();
</script>
</div>
<div id="date">
<script>
newDate() + 1;
</script>
</div>
<div id="date">
<script>
newDate() + 2;
</script>
</div>
Above is the HTML that I want to apply the script to.
function newDate() {
var _date = new Date("April 10");
document.getElementById("date").innerHTML = _date;
}
Essentially, what I'm trying to do is write a script that will show the date in the format "Friday, April 10th" and when I go to the next div and do the script it will produce "Saturday, April 11th". But right now I can't even get it to post the date. Could someone point me in a direction that would simplify and help me out?