为什么在href加入链接后菜单字体颜色会还原?如何用js实现菜单点击后变色(不要用target=_blank)
a{color:#999;}
function changeA(){
document.getElementById("menuA").style.color='#088888';
document.getElementById("menuB").style.color='#999999';
document.getElementById("menuC").style.color='#999999';
document.getElementById("menuD").style.color='#999999';
}
function changeB(){
document.getElementById("menuB").style.color='#088888';
document.getElementById("menuA").style.color='#999999';
document.getElementById("menuC").style.color='#999999';
document.getElementById("menuD").style.color='#999999';
}
function changeC(){
document.getElementById("menuC").style.color='#088888';
document.getElementById("menuA").style.color='#999999';
document.getElementById("menuB").style.color='#999999';
document.getElementById("menuD").style.color='#999999';
}
function changeD(){
document.getElementById("menuD").style.color='#088888';
document.getElementById("menuA").style.color='#999999';
document.getElementById("menuB").style.color='#999999';
document.getElementById("menuC").style.color='#999999';
}