去除IE6浏览器下获得焦点的元素的虚线框的两个小办法

【1】onfocus = "this.blur()"//得到焦点时,失去焦点

e.g. <a href="#" onfocus = "this.blur()">test</a>

【2】使用HTML标签的特性 hidefocus

e.g. <a href="#" hidefocus>test</a>

【注意】由于使元素失去焦点后,该元素将无法通过Tab键选中,所以不到万不得已,不要这么操作。

posted @ 2015-09-28 22:49  小火柴的蓝色理想  阅读(627)  评论(0编辑  收藏  举报