久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      怎么使用javascript改變顏色

      使用javascript改變顏色的方法:1、使用“元素對(duì)象.style.color = "顏色值";”語(yǔ)句來(lái)改變文本顏色;2、使用“元素對(duì)象.style.backgroundColor = "顏色值";”語(yǔ)句來(lái)改變背景顏色。

      怎么使用javascript改變顏色

      本教程操作環(huán)境:windows7系統(tǒng)、javascript1.8.5版、Dell G3電腦。

      使用javascript改變顏色

      1、使用Style對(duì)象color 屬性改變文本顏色

      color 屬性可設(shè)置文本的顏色。

      <!DOCTYPE html> <html> 	<head> 		<meta charset="utf-8"> 	</head> 	<body> 		<div id="box">元素內(nèi)容</div><br /> 		<button onclick="myFunction()">改變文本顏色</button> 		<script> 			function myFunction() { 				var box = document.getElementById("box"); 				box.style.color = "red"; 			} 		</script> 	</body>  </html>

      怎么使用javascript改變顏色

      2、使用Style對(duì)象backgroundColor 屬性改變背景顏色

      backgroundColor 屬性可設(shè)置元素的背景顏色。

      <!DOCTYPE html> <html> 	<head> 		<meta charset="utf-8"> 	</head> 	<body> 		<div id="box">元素內(nèi)容</div><br /> 		<button onclick="myFunction()">改變背景顏色</button> 		<script> 			function myFunction() { 				var box = document.getElementById("box"); 				box.style.backgroundColor = "red"; 			} 		</script> 	</body>  </html>

      怎么使用javascript改變顏色

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)