Link
The traditional method, in the tag with more attribute code, difficult to modify
<a href= "link1.htm" >link1</a>
<a href= "link1.htm" >link1</a>
<a href= "link1.htm" hidefocus= "true" >link1</a>
<a href= "link1.htm" hidefocus= "Hidefocus" >link1</a>
<a href= "link1.htm" hidefocus>link1</a> non-standard
Intermediate approach, global control
CSS implementation increases IE burden, does not recommend the use of
A{blr:expression (This.onfocus=this.close ());}
A{blr:expression (This.onfocus=this.blur ());}
HTC implementation IE support, and there are delays, not recommended
Save the following code as a file with the. HTC name extension
<public:attach event= "onfocus" onevent= "Hscfsy ()"/>
<script language= "JavaScript" >
function Hscfsy () {
This.blur ();
}
</script>
Style call
A {Behavior:url (the path address of the HTC File)}
Advanced approach, Global control
Traversal implementation
Window.onload=function ()
{
for (var ii=0; ii<document.links.length; ii++)
Document.links[ii].onfocus=function () {This.blur ()}
}
Encapsulate it as a function
function Fhidefocus (tname) {
Atag=document.getelementsbytagname (Tname);
for (i=0;i<atag.length;i++) atag[i].hidefocus=true;
for (i=0;i<atag.length;i++) atag[i].onfocus=function () {This.blur ();};
}
The current is to add a Hidefocus attribute, comment out the sentence is added Onfucus=this.blur ();
Then call Fhidefocus ("a") and remove the dotted box of a
By passing different parameters, you can remove more dashed boxes, such as "button" to remove the button
But keep in mind that the arguments are in uppercase
Application Skills and questions
A. Map area Links How do I eliminate link dashes?
This is an erroneous idea, in fact, should be controlled in the picture of the map, rather than in the area, refer to the traditional method
B. About onfocus
<a href= "http://blog.csdn.net/alonesword/" >
</a>
Among them, onfocus is set mouse Focus event things, this can be used, but also can not use, but in order to allow more browser recognition, recommended; border=0 this is the key to removing the dotted box (see some people on the internet with onfocus= "This.blur ()" To eliminate the dotted box, but in a local test, this sentence cannot be eliminated.