stargrl329
06-15-2003, 08:48 PM
I wrote a JavaScript for a custom clock, and it was working fine, until I modified it, because I wanted one that had AM and PM and not 24-hr. time. But now I can't seem to get it to work... every time I try to open the file in Internet Explorer, the script part doesn't load. Here is the script I'm using:
<script type="text/javascript">
<!--
var thedate = new Date( );
var thehours = thedate.getHours( );
var theminutes = thedate.getMinutes( );
if ( thehours >= 12 )
{
document.write( + thehours -= 13 "<font color=red>:<font color=black>" + theminutes + "PM" );
} else {
document.write( + thehours + "<font color=red>:<font color=black>" + theminutes + "AM" );
}
//-->
</script>
Does anyone know what I did wrong? Thanks for your help :)
׺׷lauren·×º×
<script type="text/javascript">
<!--
var thedate = new Date( );
var thehours = thedate.getHours( );
var theminutes = thedate.getMinutes( );
if ( thehours >= 12 )
{
document.write( + thehours -= 13 "<font color=red>:<font color=black>" + theminutes + "PM" );
} else {
document.write( + thehours + "<font color=red>:<font color=black>" + theminutes + "AM" );
}
//-->
</script>
Does anyone know what I did wrong? Thanks for your help :)
׺׷lauren·×º×