包含Label标签的链接在IE上不可点击 [英] Links containing a Label tag are not clickable on IE

查看:111
本文介绍了包含Label标签的链接在IE上不可点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



以下链接在IE中是不可点击的,但在其他所有内容上都很好(我尝试过IE8以下):

 < a href =http://bbc.co.uk>< label>文字< ; /标签>< / A> 

虽然上述方法不起作用,但交换div或跨度的标签很好。 / p>

有没有什么明智的方法可以在IE中使用这种标记方式,只需要很少的修改。如果可能,我想保留标签标签。

解决方案

不使用标签内的标签invalidate作为标签的html是交互式内容?为此,您最好使用跨度。


I've come across an unusual situation with general IE compatibility.

The following link is unclickable in IE, but fine on everything else (I've tried IE8 onwards):

<a href="http://bbc.co.uk"><label>text</label></a>

Whilst the above doesn't work, swapping the label for a div or a span is fine.

Is there any sensible way to make this style of markup work in IE with minimal changes. I'd like to keep the label tag if at all possible.

解决方案

Doesn't using a label inside an a tag invalidate the html as a label is interactive content? You'd be better served using a span for this.

这篇关于包含Label标签的链接在IE上不可点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆