日期:2014-05-16 浏览次数:20562 次
<a href="http://www.ijser.cn" target="_blank" id="myLink" onclick="this.setAttribute('isVisited', true)"> ijser.cn </a>
?<button id="checkVisited">Check</button>
------解决方案--------------------
a:visited 就行了啊,哪里需要用js
------解决方案--------------------
JavaScript没学好.... 来学习了....
------解决方案--------------------
是color不是backgroundcolor
------解决方案--------------------
2楼的方法多么简单,你们还判断什么啊!!!!!
<html>
<head>
<style>
a:link{
color:blue;
}
a:visited{
color:red;
}
</style>
</head>
<body>
<a id="a1" href="#test1"></a>
<a id="a2" href="#test1"></a>
<a id="a3" href="#test3"></a>
</body>
</html>