请问页面上的链接怎样实现点了它之后变成某种颜色,而当点别的链接的时候它又还原成原来没点它时的颜色??? 加入这个样式表就行了<style>A { color:white; }A:active { color:red; }</style> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 还是不对啊,这种效果是:鼠标点击按下时颜色变成了red,可是鼠标松开时又变成了white,我要的效果是当点击另外一个链接时前一个链接的颜色才还原成white <style>A{t:expression(this.onclick=function(){var links=document.getElementsByTagName('A');for(var i=0;i<links.length;i++)links[i].style.color='white';this.style.color='red';});color:white}</style><body bgColor='lightblue'><a href='#'>1</a><br><a href='#'>2</a><br></body> 排版有点问题,看下面的:<style>A{t:expression(this.onclick=function(){var links=document.getElementsByTagName('A');for(var i=0;i<links.length;i++)links[i].style.color='white';this.style.color='red';});color:white}</style><body bgColor='lightblue'><a href='#'>1</a><br><a href='#'>2</a><br></body> <style>A { color:white; }A:active { color:red; }A:visited { color:red;}哪有那么烦啊,晕</style> 跪求这几题答案,会追加分的,谢谢!万分感谢! js判断checkbox选中 求助 JS clearTimeout 无效 这种数组格式在JS中怎么形成呢? 请教JS中,event.return和return 区别 js在jsp中和html中一样吗 急,js与html问题,帮帮忙,在线等 怎样用JS生成这样的XML文档???? 这个比较简单?在线等待! javaScript中的确认对话框函数有那些及它们的用法? 求教:javascript实现表单中2个文本框之间的数值转换,英寸和厘米之间的转换,请给出代码! 如何屏蔽菜单栏、工具栏与地址栏但保留标题栏
A{t:expression(this.onclick=function(){var links=document.getElementsByTagName('A');for(var i=0;i<links.length;i++)links[i].style.color='white';this.style.color='red';});color:white}
</style>
<body bgColor='lightblue'>
<a href='#'>1</a><br>
<a href='#'>2</a><br>
</body>
A{t:expression(this.onclick=function(){var links=document.getElementsByTagName('A');for(var i=0;i<links.length;i++)links[i].style.color='white';this.style.color='red';});
color:white}
</style>
<body bgColor='lightblue'>
<a href='#'>1</a><br>
<a href='#'>2</a><br>
</body>
A {
color:white;
}
A:active {
color:red;
}
A:visited {
color:red;
}
哪有那么烦啊,晕
</style>