发现浏览器 getComputedStyle 一个bug。
检查网页:
<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>