Twitter bootstrap 推特引导&x27;残疾人士';类不在ie9上工作

Twitter bootstrap 推特引导&x27;残疾人士';类不在ie9上工作,twitter-bootstrap,internet-explorer-9,Twitter Bootstrap,Internet Explorer 9,使用引导,当您将“.disabled”类添加到按钮时,它会更改其不透明度并禁用按钮单击 这是在Chrome和Firefox的当前版本上进行的 在InternetExplorer9上,我使用按钮更改其不透明度,但当我单击它时,它会提交我的表单(尽管光标图标更改为禁止标志) 有没有办法解决这个问题?主按钮 <button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">Pri

使用引导,当您将“.disabled”类添加到按钮时,它会更改其不透明度并禁用按钮单击

这是在Chrome和Firefox的当前版本上进行的

在InternetExplorer9上,我使用按钮更改其不透明度,但当我单击它时,它会提交我的表单(尽管光标图标更改为禁止标志)

有没有办法解决这个问题?

主按钮
<button type="button" class="btn btn-large btn-primary disabled" 
   disabled="disabled">Primary button</button>

<button type="button" class="btn btn-large" disabled>Button</button>
按钮
我试着在所有浏览器中使用上述按钮都很好

注:


在链接的情况下使用禁用的类


干杯

我知道很久以前就有人问过这个问题,但我遇到了同样的问题

这在IE<11下不起作用,因为引导使用的是IE 10和更早版本不支持的“指针事件”css属性。()

我为按钮设计了一个简单的JS:

$('button.disabled').prop('disabled', true);
有关链接:

$('a.disabled').click(function(){
       $(this).preventDefault();
});

我希望这会有所帮助。

在添加了.disabled类之后,您能检查一下HTML中是否添加了disabled=“disabled”?disabled=“disabled”没有添加,但在Chrome/Firefox上也没有添加,并且可以正常工作。我认为这与IE9实现(或不实现)指针事件的方式有关:shttps://developer.mozilla.org/en-US/docs/Web/CSS/pointer-eventsEffectively,添加disable=“disabled”有效(这就是我最后要做的)。但我的目的是想找到一种方法,在我的Firefox(V25.0)和Chrome(V30.0.1)浏览器中,当.disabled类被添加到元素(比如Chrome/Firefox do)中时,让IE9禁用鼠标事件。我发现添加disabled类并没有禁用鼠标事件,它只添加了一个CSS类,导致不透明度降低。但是这个按钮在所有浏览器中都是可以点击的。嗨,阿米特,当你测试它时,你是否包括了twitter引导js和css?我想他们在某种程度上禁用了鼠标点击是的,我在测试时包括了jquery.js、bootstrap.min.css和bootstrap.min.js文件。这在IE8中不起作用。对于IE8$('a.disabled').click(function(){ $(this).preventDefault(); });