複製程式碼程式碼如下: <BR> <style type="text/css"> <BR> <style type="text/css"> <BR> {<BR> 背景顏色:白色;<BR> }<BR> 🎜 > }<BR> </樣式> ;<BR> <script language="javascript 「 type="text/javascript"><BR> function operStyle() {<BR> var btnObj = document.getElementById(“ btncommit”);<BR> if(divobj.classname ==「 day」){<BR>divobj.classname =「夜」;<BR>btnobj.value =「 } else {<BR> btnObj. value = "關燈";<BR> }<BR> }<BR> function methodOne() {<BR> var divObj = document.getElementById("divTest");<BR> divObj。 = "300px";<BR> divObj.style.height = "200px";<BR> }<BR> // 方法2:<BR> unction methodTwo() {<BR> var divObj = document.getElementById("divTest");<BR> 200px;背景位置:中心";<BR> }<BR> <BR><BR><body><BR> <form id="form1" runat="server" ><BR> <form id="form1" runat="server" ><BR> <form id="form1" runat="server" ><BR>div divContent" class="day"><BR> <font color="red">我是呀一個div啊,咿咿呀喲! <BR> > divTest 的樣式,多屬性操作