You actually have a table with 24 cells (<td id="head1"></td>... <td id="head24"></ td>) ?
You really call the function with an event or an instruction insertDate() ?
Are the preceding tags present in the body during this call ?
You have to update the current date in the loop and to call currDate.toLocaleString() or currDate.toUTCString(), or to build your date format to display something readable...
Try this for the loop
<body>
<div id="pge">
<ul id="lst"></ul>
</div>
[COLOR="#0000FF"]// The script at the end of the body : the list container exists when we call setDates().[/COLOR]
<script type="text/javascript">
var mns='January,February,March,April,May,June,July,August,September,October,November,December'.split(',');
function setDates(){
[COLOR="#0000FF"]// The initial current date[/COLOR]
var crtDte=new Date()
for (var i=0;i<24;i++){
[COLOR="#0000FF"]// One day later[/COLOR]
crtDte.setDate(crtDte.getDate()+1);
document.getElementById('lst').innerHTML+='<li>'+crtDte.getDate()+' '+mns[+crtDte.getMonth()]+' '+crtDte.getFullYear()+'</li>';
}
}
setDates();
</script>
</body>