Remove Link Dashed box

Source: Internet
Author: User
Tags expression
Link Local Control

<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>

Global Control  

CSS Implementation

A{blr:expression (This.onfocus=this.close ());///* only supports IE, excessive use efficiency low *

A{blr:expression (This.onfocus=this.blur ());///* only supports IE, excessive use efficiency low *

A:focus {-moz-outline-style:none}/* IE does not support * *

HTC to achieve IE support, the page will only be effective after loading

Save the following code as. HTC <public:attach event= "onfocus" onevent= "Hscfsy ()" For the file name extension/>
<script language= "JavaScript" >
function Hscfsy () {
This.blur ();
}
</script>
Call a {Behavior:url (the path address of the HTC File)}

JS Traversal Implementation Window.onload=function ()
{
for (var ii=0; ii<document.links.length; ii++)
Document.links[ii].onfocus=function () {This.blur ()}
}
JS is encapsulated as functional 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"), you can 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

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>
Onfocus is a set of mouse focus events, this can be used, you can not use, but in order to allow more browsers to identify, recommend the use of border=0 this is the key to remove the dotted box (see some people on the internet to eliminate the dotted box, but in the local test, Only this sentence is not to be eliminated)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.