< button>在IE7中 [英] <button> in IE7

查看:87
本文介绍了< button>在IE7中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在<button>标签上尝试了一些简单的jQuery操作,但是由于某些原因,在IE7上不起作用.

I tried a few simple jQuery manipulation on <button> tags but, for some reasons, didn't work on IE7.

<!-- HTML -->
<button class="button">Hello</button>

// jQuery, using v1.4.4
$('button').html('Hello World!');         // Works on Firefox and IE7.
$('button').addClass('another-class');    // Works on Firefox; *not* on IE7.
$('button').wrapInner('<span></span>');   // Works on Firefox; *not* on IE7.

有人对此有任何线索吗?

Does anyone have any clues about this?

推荐答案

在IE6和IE7上不完全支持button标记.它与jQuery不相关,但与标签本身有关,如此处所述:

The button tag isn't fully supported on IE6 and IE7. It isn't related to jQuery, but about the tag itself, as described here: What disadvantages are there to the <button> tag?.

这篇关于&lt; button&gt;在IE7中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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