Link failure problem of label embedded in IE

Source: Internet
Author: User

The input type attribute has a value of "image ".

Sometimes using this label and its default style can easily achieve the desired performance.

However, if this tag is placed in the <A> tag, the link will become invalid in IE.

The reason is that the input image form element is actually equivalent to submit,

When you click it, the form submission event is triggered. If there is a form, it will be submitted. If not, it will jump Based on the outer a tag, but it will be invalid in IE.

Solution: Use js to cancel the button's submit, or use or other HTML tags.

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.