CSS compatibility issues this.style.cursor= ' hand ' _ Experience Exchange

Source: Internet
Author: User
Author: Loko
Look at this one first.
Copy Code code as follows:

<a href= ' # ' onmouseover= ' this.style.cursor= ' hand ' "onmouseout=" this.style.cursor= ' Default ' "onclick=" document.getElementById (' showcontent '). innerhtml= '; return false; >

</a>

Under IE is no problem, when the mouse stroke, there will be a small hand shape, but in FF, only the first row to be effective, this is effective because of the existence of anchor a, rather than onmouseover effect of the result.
Find a lot on the internet, said that as long as the this.style.cursor= ' hand ' changed to this.style.cursor= ' pointer ' on it, but in the FF mouse stroke in the past only the first time will appear small hands.
In fact, under the FF to achieve in IE in the same effect is also possible. Our approach is to use CSS HACK (do I add this for CSS HACK, haha?) )
Copy Code code as follows:

<a href= ' # ' onmouseover= ' this.style.cursor= ' pointer ' this.style.cursor= ' hand ' onmouseout= ' this.style.cursor= ' Default ' onclick= ' document.getElementById (' showcontent '). innerhtml= '; return false; >

</a>

Test passes in IE7 and FF3.0.3.

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.