如何能够用javascript对已访问过的链接作出响应,比如在链接后加个*号 你在样式表里对已经访问过的链接作出一个不同的样式不就可以标明已经访问过了的吗!!A:VISITED{} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 document.all("idHre").innerText="This is a href *""idHre" 是<a href>的id to KevinAdmin(Kevin) 你写的言不答意啊我问你,你怎么断定idHre的链接是已经访问过的,怎么来表达? <a href="http://www.csdn.net" onclick="javascript:this.innerHTML+='*'" target=_blank>csdn</a> <style>a:link {visited:false;color:black;font-size:12px;}a:visited {visited:true;color:blue;font-size:12px;}a:hover { color:red;}a:active { color:red;}</style><body><script>document.body.onload = function() {for (var i=0;i<document.links.length;i++) { with(document.links[i]) { if(currentStyle.visited=="true") innerText += "*"; }}}</script><a href="###">link</a><a href="http://www.sayee.com/cloudchen/js/select.htm">link</a><a href="http://www.yahoo.com">link</a><a href="http://www.whitehouse.org">link</a><a href="http://expert.csdn.net/Expert/topic/2210/2210261.xml?temp=.5875666">link</a><a href="http://www.xxxyyyzzz.com">这个链接肯定没有访问过</a> 关于onchange的问题,百度无结果 如何做特效的导航 请问这段代码怎么的执行流程? JS的超链接· 用过jquery的validation组件的请进一下! 关于页面的拖动功能 removeChild 对js构造函数和prototype使用的疑惑 javascript中如何给表单名为变量的表单赋值 javascript中十进制转十六进制的函数是什么? 弹出新窗口时,怎么令最大化按钮不能用??急,在线等待 问一个很简单,但一直困扰我的问题,帮忙解答,谢谢
"idHre" 是<a href>的id
你写的言不答意啊我问你,你怎么断定idHre的链接是已经访问过的,
怎么来表达?
a:link {visited:false;color:black;font-size:12px;}
a:visited {visited:true;color:blue;font-size:12px;}
a:hover { color:red;}
a:active { color:red;}
</style>
<body>
<script>
document.body.onload = function() {
for (var i=0;i<document.links.length;i++) {
with(document.links[i]) {
if(currentStyle.visited=="true") innerText += "*";
}
}
}
</script>
<a href="###">link</a>
<a href="http://www.sayee.com/cloudchen/js/select.htm">link</a>
<a href="http://www.yahoo.com">link</a>
<a href="http://www.whitehouse.org">link</a>
<a href="http://expert.csdn.net/Expert/topic/2210/2210261.xml?temp=.5875666">link</a>
<a href="http://www.xxxyyyzzz.com">这个链接肯定没有访问过</a>