日期:2014-05-16 浏览次数:20501 次
<html> <head> <script type = 'text/javascript'> function OnCheck() { var ele = document.getElementById('id') var col= getComputedStyle(ele, "").color; //获得超链接字体颜色. alert(col); } </script> </head> <body> <a id='id' href="http://www.baidu.com/">百度</a> <input type= "button" value="检查是否访问过链接" onclick='OnCheck()' /> </body> </html>