?<body>
?????<p?id="pid"?style="color:blue">hello</p>
????<button?onclick="changeColor()">按鈕</button>
????<script>
?????function?changeColor(){
?????document.getElementById("pid").style="color:red";
??}
??</script>
</body>
嘗試了一下,為什么點擊按鈕之后顏色沒變呢
caterien
2016-01-18 14:23:55