Javascript jasny文件上传仅适用于Chrome
这简直要了我的命。Jasny出色的文件上传插件在Chrome中运行良好,但在Firefox和IE中,单击“选择文件”按钮根本不起作用。实际上,在Firefox中,我收到一条jquery错误消息:Javascript jasny文件上传仅适用于Chrome,javascript,jquery,twitter-bootstrap,jasny-bootstrap,Javascript,Jquery,Twitter Bootstrap,Jasny Bootstrap,这简直要了我的命。Jasny出色的文件上传插件在Chrome中运行良好,但在Firefox和IE中,单击“选择文件”按钮根本不起作用。实际上,在Firefox中,我收到一条jquery错误消息: [12:18:36.388] Empty string passed to getElementById(). @ https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js:3 我使用的是Bootstrap 2.3.2和Jasny
[12:18:36.388] Empty string passed to getElementById(). @ https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js:3
我使用的是Bootstrap 2.3.2和Jasny的Bootstrap文件上传,他现在似乎已经将其重命名为fileinput
输入似乎很简单:
<div class="fileupload fileupload-new" data-provides="fileupload" data-name="user_profile_picture">
<div class="input-prepend input-append">
<span class="add-on"><i class="icon-picture"></i></span>
<div class="uneditable-input span3"><i class="icon-file fileupload-exists"></i><span class="fileupload-preview"></span></div><span class="btn btn-file"><span class="fileupload-new">Select file</span><span class="fileupload-exists">Change</span><input type="file" name="user_profile_picture"></span><a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
</div>
</div>
无济于事。好吧,经过许多令人讨厌的调整后,我发现我的一个css文件导致它在Firefox中无法工作。如何 css文件中唯一相关的内容是设置:
input {
max-width: 100%;
}
我补充说
.fileupload input {
max-width: none;
}
问题已经解决了。把我弄糊涂了
.fileupload input {
max-width: none;
}