I wanted to add JavaScript(showing the time), but it seems that it does not work on IE7.
Chances are you've done something wrong, or failed to compensate for a bug. However, I suspect the former: this isn't (or shouldn't be) a complex script.
Are there alternatives that I can do, instead of using other Internet Browsers?
Yes, fix your script.
What's the "best" Internet Browser for DHTML?
Define "best," and the application of "DHTML" to which you refer.
I assume that most users use Internet Explorer
Alas yes.
can web developers change their codes to allow IE to display the "right" output?
Usually, with varying amounts of effort and success.
A simple clock script would be:
Code:
<span id="clock"> </span>
<script type="text/javascript">
function startClock(el) {
var retval = stopClock(el);
el.clockTimer = window.setInterval(function() { clockTick(el); }, 1000);
return retval;
}
function clockTick(el) {
var d = new Date();
el.firstChild.nodeValue = [d.getHours(), d.getMinutes(), d.getSeconds()].join(":");
}
function stopClock(el) {
if(el.clockTimer !== null) {
window.clearInterval(el.clockTimer);
el.clockTimer = null;
return true;
} else return false;
}
startClock(document.getElementById("clock"));
</script>
Bookmarks