-2

使用 html、css 和 DW 模板,如何使菜单中当前页面的链接的字体颜色与其他页面链接的颜色不同?我不知道JavaScript等。

4

1 回答 1

0

function changecolor(colorhere){
var x=document.getElementById("text");
x.style="color:"+colorhere;
  }
<p id="text">
  Some and so on text here
</p><br>
<button onclick='changecolor("red")'>Red</button>
<button onclick='changecolor("blue")'>Blue</button>
<button onclick='changecolor("yellow")'>Yellow</button>

使用javascript更改颜色!

于 2015-06-26T03:15:19.080 回答