css: 兼容性很差。
| 代码如下 | |
|              a:focus,input:focus {outline:none;}  |         |
在 Firefox 里可以用 -moz-outline:none; 或者 outline:none; 来将其去掉。所以我们可以这样写:
| 代码如下 | |
|              a:focus  {  |         |
直接加:
onfocus="this.blur()"
也可以利用htc文件加入a.style.behavior属性.如:
| 代码如下 | |
|              <style>  |         |
在js文件中写入下面语句
| 代码如下 | |
| <attach event="onFocus" handler="onFocus" /> <SCRIPT language="javascript"> function onFocus() { this.blur(); } </SCRIPT>  |         |
JQ的写法:
| 代码如下 | |
|              $("input:not(input[type='text'],input[type='password'])").focus(function(){ });  |         |