This article uses JS, CSS, label attributes, and other methods to remove the dotted line boxes on IE links. The method is very simple and you can choose to use
Method 1: Use the javascript onfocus eventThe implementation is as follows:
Html code
The Code is as follows:
Design Honeycomb
If the jQuery framework is introduced, you can use its event binding mechanism:
Js Code
The Code is as follows:
$ ('A'). bind ('focal ', function (){
If (this. blur) {// if this. blur is supported
This. blur ();
}
});
Method 2: Use the css style to implement the following::
Css code
The Code is as follows:
A {
Blr: expression (this. onFocus = this. close ());
}/* Only supports IE, Which is inefficient when used too much */
A {
Blr: expression (this. onFocus = this. blur ());
}/* Only supports IE, Which is inefficient when used too much */
A: focus {
-Moz-outline-style: none;
}/* IE does not support */
: Focus {
Outline: none;
}/* For Firefox */
Method 3: using label attributes, only Internet Explorer is supported.: Html code
The Code is as follows:
Design Honeycomb
Method 4: HTC implements the following:
Save the code as a. htc extension file.
Js Code
The Code is as follows: