Valumes没有在Firefox(MVC3项目)下显示UPLOAD按钮。
它适用于:IE,Chrome
我要杀了自己,但我不明白为什么会这样?
ANYYY CLUUU pleaseeee!
<script src="@Url.Content("~/Scripts/valums/FileUploader.js")" type="text/javascript"></script>
<div id="fileUploader">
<noscript>
<p>
Please enable JavaScript to use file uploader.</p>
<!-- or put a simple form for upload here -->
</noscript>
</div>
.................
var button = $('#fileUploader')[0];
var uploader = new qq.FileUploader({
element: button,
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
sizeLimit: 2147483647,
action: '@Url.Action("UploadFile")',
multiple: false,
onComplete: function (id, fileName, responseJSON) {
var uploadedFile = "/Images/Orders/thumb-" + responseJSON.uploadedFile;
$("#uploadedImage").attr("src", uploadedFile);
$("#ImageErrorMessage").text("");
}
});
答案 0 :(得分:0)
只需将VALUMS代码放在$(document).ready(function () { // here });
并将其保留在<HEAD>
标记下。就是这样!