課程上加 document.write這段代碼有啥用啊,不加也行啊,直接改類名不就行了嗎
<script?type="text/javascript"> ???function?add(){ ??????var?p1?=?document.getElementById("p1"); ??????p1.className="one"; ???} ???function?modify(){ ??????var?p2?=?document.getElementById("p2"); ??????p2.className="two"; ???} </script>
2015-10-14
只是為了顯示在瀏覽器里,可能老師覺得這樣看起來好理解 直觀些