<style> table{ border-collapse: collapse; } th,td{ border:1px solid #09f; } div{ width:100px; height:100px; background-color:red; margin-top:20px; } #img{ height:200px; } </style> </head> <body> <button onclick="setStyle1('obj1','width','200px')">變寬</button> <button onclick="setStyle1('obj1','height','200px')">變高</button> <button onclick="setStyle1('obj1','background','green')">變色</button> <div id="obj1"></div> <button onclick="setColor2(1)">變成紅色</button> <button onclick="setColor2(2)">變成綠色</button> <button onclick="setColor2(3)">變成藍色</button> <div id="obj2"></div> <button onclick="switchImg()">切換圖片</button> <div id="img"> <img id="pic" src="./pic/1.jpg"> </div> <button onclick="switchZimu1()">順時針切換字母</button> <button onclick="switchZimu2()">逆時針切換字母</button> <div id="zimu"> A </div> </body> </html> <script src="./JS/sushu.js"></script>