1. For a single or a small number of links
<A href = "" onfocus = "This. Blur ()"> I am a hyperlink </a>
2. Remove dotted boxes in batches
JS method:
<SCRIPT type = "text/JavaScript">
VaR _ aobj = Document. getelementsbytagname ("");
VaR _ length = __aobj. length;
For (VAR I = 0; I <__ length; I ++ ){
_ Aobj [I]. onfocus = function () {This. Blur ();}
}
</SCRIPT>
Or
<SCRIPT>
VaR objas = Document. getelementsbytagname ("");
VaR obja;
For (VAR I = 0; obja = objas [I]; I ++ ){
Obja. onfocus = function () {This. Blur ()};
}
</SCRIPT>
Use CSS:
: Focus {outline: none;} // For firfox
A, area {BLR: expression (this. onfocus = This. Blur ()} // for IE
It is not very necessary. We do not recommend using expression because expression has high requirements on browser resources.
3. jquery Method
$ (Document). Ready (
Function (){
$ ("A"). BIND ("focus", function () {If (this. Blur) This. Blur ();});
});