IE10报如此错误如何解决?
在使用jquery Uploadify v3.2.1插件时报错!
$(function(){
setTimeout(function(){
uploadify({
debug:false,
text:'上传附件',
auto:true,
hide:false,
size:"500MB",
resText:'file_ids',
exts:'*.pdf;*.doc;*.docx;*.xls;*.ppt;*.wps;*.zip;*.rar;*.txt;*.jpg;*.jpeg;*.gif;*.bmp;*.swf;*.png;*.lsp;*.dwg;*.igs;*.sat;*.prtdot;*.asmdot;*.drwdot',
limit: 5
}, uploadResponse);
},500);
})
function uploadResponse(json){
if($("#file_ids").val()){
$("#file_ids").val($("#file_ids").val()+','+json.msg.fileid);
}else{
$("#file_ids").val(json.msg.fileid);
}
}
function uploadify(paramReg, uploadResponse, deleteResponse) {
var paramReg = paramReg ? paramReg : {};
var uploadify = {};
var auto = paramReg.auto == true ? true : false;//是否自动提交
var debug = paramReg.debug == true ? true : false;//是否开启debug调试
var hide = paramReg.hide == true ? true : false;//上传完成后是否隐藏文件域
var swf = paramReg.swf ? paramReg.swf : '/js/uploadify/uploadify.swf';//flash路径
var uploader = paramReg.uploader ? paramReg.uploader : '/uploadFile?action=upload';////上传基本路径
var deleter = paramReg.deleter ? paramReg.deleter : '/uploadFile?action=delete';//文件删除路径
var file = paramReg.file ? paramReg.file : 'upload';//file 表单名name=id=upload
var size = paramReg.size;//文件大小限制
var exts = paramReg.exts;//文件类型限制
var resText=paramReg.resText;
var method = paramReg.m ? paramReg.m : 'post';//上传方式
var limit = paramReg.limit ? paramReg.limit : 1;//上传个数限制
var qlimit = paramReg.qlimit ? paramReg.qlimit : 999;
var text = paramReg.text ? paramReg.text : '上传文件';//按钮文字
uploader = uploader + '&filename=' + file;
uploadify.auto = auto;
uploadify.debug = debug;
uploadify.hide = hide;
uploadify.swf = swf;
uploadify.uploader = uploader;
uploadify.deleter = deleter;
uploadify.fileObjName = file;
uploadify.fileSizeLimit = size;
uploadify.fileTypeExts = exts;
uploadify.resText=resText;
uploadify.uploadLimit = limit;
uploadify.queueSizeLimit = qlimit;
uploadify.method = method;
uploadify.buttonText = text;
uploadify.removeTimeout = 1;
uploadify.removeCompleted = hide;
uploadify.onUploadSuccess = function(file, json, response) {
json = eval('(' + json + ')');
if (json.err) {
if (msgType == 1) {
tipsOp(decodeURI(json.err));
} else {
tipsOp(decodeURI(json.err));
}
return false;
} else {
if($("#filepath")){
if ($("#filepath").val()) {
$("#filepath").val($("#filepath").val() + '|' + json.msg.url);
} else {
$("#filepath").val(json.msg.url);
}
}
if($("#fileid")){
if ($("#fileid").val()) {
$("#fileid").val($("#fileid").val() + '|' + json.msg.fileid);
} else {
$("#fileid").val(json.msg.fileid);
}
}
typeof (uploadResponse) == 'function' && uploadResponse(json);
}
var cancel = $("#" + file.id + " .cancel a");
if (cancel) {
cancel.on('click', function () {
typeof (deleteResponse) == 'function' && deleteResponse(json);
});
}
};
uploadify.onProgress = function(file, e) {
if (e.lengthComputable) {
var percent = Math.round((e.loaded / e.total) * 100);
}
file.queueItem.find('.fileinfo').html(' - ' + percent + '%');
file.queueItem.find('.progress-bar').css('width', percent + '%');
};
$("#" + file).uploadify(uploadify);
}
如何解决?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论