"Javascript" IE8 compatible background image with the A-tag onclick event

Source: Internet
Author: User

Say a few words of complaint first.

Although IE8 than the IE6, 7 have a lot of progress, but in the implementation of efficiency, compatibility still have many problems. A platform that is popular among developers is a good platform.

Unfortunately, thanks to pirated XP opened China's computer market, ie as a bundle of software is still in China has a large use of people. Since the Chinese have buried their own pits, biting their teeth will also go down.

The onclick event of a tag

In the development of this platform, with the domestic DWZ open-source front-end framework, or very useful, the compatibility of IE is also relatively good, rarely found that there are big problems.

Just as the beginning of the title, the page pop-up reminder box, the "OK" button can not point, resulting in the page equivalent to the crash, can only be refreshed again.

Open the code to see, the original OK button is written with a tag:

<a class= "button" rel= "#callback #" href= "javascript:" onclick= "alertmsg.close ();" ><span> OK </span></a>

After trying multiple methods, finally find a workaround: Instead of using the OnClick event, call the Close () method with the pseudo-code in the href.

<a class= "button" rel= "href=" Javascript:alertMsg.close (); " ><span> OK </span></a>

  

Background image

DWZ In addition to just that problem, also really did not find what compatibility problem, have to say is a good open source framework, with so long, help to make an advertisement it.

Because my login interface was written by myself, not the DWZ UI framework, I found a problem with the pit Daddy: the container cannot use Background-image.

Of course, I exaggerate, background pictures can be used, but the background image can not be self-adaptive, there is what eggs to use.

Use a variety of methods, such as the legend of the filter , so that although it can be adaptive, why the container input box is not selected?!!!!!

Finally there is no way, with what bird background-image, directly to the picture set to position:absoulte;top:0;left:0;z-index:0;

It floats behind the container, not the background.

"Javascript" IE8 compatible background image with the A-tag onclick event

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.