我在同一個網頁上有類似的代碼,谷歌瀏覽器加載它就好了。但是這個特殊的功能似乎只適用於某些瀏覽器。我自己找不到任何錯誤。也許我可以用不同的方式寫出這個陳述?爲什麼這個Javascript代碼不能在谷歌瀏覽器中工作
<script type="text/JavaScript">
<!--
function changeWebsite() {
var currentTime = new Date().getHours();
if (7 <= currentTime&¤tTime < 17) {
document.write(' <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_VC01.png" width="200" height="45" alt=""> ');
document.write(' <a href="http://www.itsnotch.com" <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_VC02.png" width="200" height="75" border="0" alt="ItsNotch.com"></a> ');
document.write(' <a href="http://www.notchtheguru.com" <img src="http://itsnotch.com/tumblr/images/NotchTheGuru.comVC.png" width="200" height="119" border="0" alt="Tumblr"></a>');
document.write('<a href="http://www.bignotch.com" <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_VC04.png" width="200" height="161" border="0" alt="NotchTheGuru.com"></a>');
}
else {
document.write(' <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_01.png" width="200" height="45" alt=""> ');
document.write(' <a href="http://www.itsnotch.com" <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_02.png" width="200" height="75" border="0" alt="ItsNotch.com"></a> ');
document.write(' <a href="http://www.notchtheguru.com" <img src="http://itsnotch.com/tumblr/images/NotchTheGuru.com.png" width="200" height="119" border="0" alt="Tumblr"></a>');
document.write('<a href="http://www.bignotch.com" <img src="http://itsnotch.com/tumblr/images/websitelist_tumblr_04.png" width="200" height="161" border="0" alt="NotchTheGuru.com"></a>');
}
}
changeWebsite();
-->
</script>