幫我把下這個簡單的網頁有什麼錯誤?
<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>
查询谷 - www.chaxungu.com
幫小弟我把下這個簡單的網頁有什麼錯誤
编辑:chaxungu时间:2022-10-02 23:22:35分类:web开发