按钮在Chrome上正常运行但在IE上无效

时间:2014-12-05 11:45:35

标签: javascript html angularjs internet-explorer angularjs-directive

我目前正在做一个网络界面。我正在使用Angular框架

我有这个添加文件按钮。它应该只允许添加一个文件。这适用于Chrome,但不适用于IE 11。

有谁知道可能会造成这个问题?

代码:

<span class="btn btn-success fileinput-button" ng-class="{disabled: disabled}" ng-disabled="queue.length>= 1">
  <i class="glyphicon glyphicon-plus"></i>
  <span>Add file...</span>
  <input type="file" name="files[]" ng-disabled="disabled" accept=".zip,application/octet-stream,application/zip,application/x-zip,application/x-zip-compressed">
</span>

1 个答案:

答案 0 :(得分:0)

我在JSFiddle上编辑(一点,只有一个字符)你的代码

检查:

http://jsfiddle.net/yk7x8kpL/

<强> CODE:

<span class="btn btn-success fileinput-button" ng-class="{disabled: disabled}" ng-disabled="queue.length>= 1">
    <i class="glyphicon glyphicon-plus"></i>
    <span>Add file...</span>
    <input type="file" name="files[]" ng-disabled="disabled" accept=".zip,application/octet-stream,application/zip,application/x-zip,application/x-zip-compressed"/>
</span>

它适用于IE 11