日期:2014-05-16  浏览次数:20342 次

幫我把下這個簡單的網頁有什麼錯誤?
<form>
<input   type= "button "     value= "加123 ">
</form>
<script>
word=content.innerHTML;
document.write(word+ "123 ");
</script>
<div   id= "content ">
隨便寫篇文章
</div>

------解决方案--------------------
word=content.innerHTML; //此时content div还没有加载,当然找不到出错了.
document.write(word+ "123 ");
</script>
<div id= "content ">
隨便寫篇文章
</div>