表单提交前,判断webuploader是否上传
2021-07-05 15:04
标签:style amp class input ext web als function put 表单提交前,判断webuploader是否上传 标签:style amp class input ext web als function put 原文地址:http://www.cnblogs.com/gxp69/p/7106316.htmlfunction busUpLoadImg(postUrl,id) {
.......//省略部分不用修改
uploader.on(‘uploadSuccess‘, function(file) {
$(‘#‘ + file.id).addClass(‘upload-state-done‘);
//验证是否上传上传
oSuccess = true;
});
//回调函数验证是否上传
var oSuccess = false;
return function(){
return oSuccess;
}
}
input type="text" />
input type="submit" onclick="subMit()" />
function subMit(){
fn1 = busUpLoadImg("postUrl",1);
fn2 = busUpLoadImg("postUrl",2);
if(!(fn1() && fn2())){
layer.msg("请上传图片",{time:1500});
return false;
}
}
文章标题:表单提交前,判断webuploader是否上传
文章链接:http://soscw.com/index.php/essay/102082.html