blr没有特殊意思,expression 条件,这句话的意思是链接 a 在获得焦点的同时失去焦点。

如果你用的是图片链接什么的,他不会显示周边的虚线。

此段代码的作用是清除 A 链接在点击时会产生虚线的问题。

三种写法:

1、正常写法

<a href="#" onfocus=this.blur();>链接标题</a>

2、CSS写法

a{blr:expression(this.onFocus=this.blur());}

3、JS写法

<script type="text/javascript">
var __aObj = document.getElementsByTagName("a");
var __length = __aObj.length;
for (var i = 0; i < __length; i++) {
__aObj[i].onfocus = function () { this.blur(); }
}
</script>

http://blog.wanghaida.com/ablrexpressionthis-onfocusthis-blur/

相关文章:

  • 2021-11-27
  • 2021-12-20
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2021-12-05
猜你喜欢
  • 2021-07-31
  • 2021-08-28
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
相关资源
相似解决方案