css - a:active issue in ie6 -
I am asking a few questions about changing the category / status of a link to normalize. I'm using one: When the user clicks on it then active to change a period's background. The target of the link is set to Javascript: zero (0), so clicking on the link simply invokes my JS function. However, when the user releases the mouse button, one: for the active status link Should be removed, the background has been changed in general, but in 6 it is not.
In IE6, "active" sometimes " Focused "until another element gets the focus, the DOM object will be" active ", or it will become blurred. If you add a javascript on-free event to the link that calls blur ()
, the active status should be released when the user's mouse button is released:
& Lt; A href = "whatever" & gt ;! Link & lt; / A & gt; ... & lt; / Body & gt; & Lt; Script type = "text / javascript" & gt; Function Handlace () {window.event.srcElement.blur (); } If (I6) {var link = document.getElementsByTagName ('A'); (Var i = 0; i & lt; links.length; i ++) {link [i] .onmouseup = handleMouseup; }} & Lt; / Script & gt;
This will ensure that you want to use any href (javascript: zero (0), #, whatever)
Comments
Post a Comment