<!DOCTYPE HTML><html><head> <meta charset="utf-8" /> <title>js2</title> <style type="text/css"> #div1 {width:300px; height:300px; background:blue; } </style> <script> function toGreen() {var change=document.getElementById('div1'); change.style.width='400px'; change.style.height='400px'; change.style.background='green'; } function toBlue() {var change=document.getElementById('div1'); change.style.width='300px'; change.style.height='300px'; change.style.background='blue'; } </script></head><body><div id="div1" onmouseover="toGreen" onmouseout="toBlue"></div></body></html>
哪里錯了,求問?
MM們
2018-08-10 13:14:16