日期:2014-05-16 浏览次数:20754 次
var options = {
beforeSend: function() {
progress.show();
var percentVal = '0%';
bar.css('width',percentVal)
percent.html(percentVal);
status.html('上传中……')
},
uploadProgress: function(event, position, total, percentComplete) {
alert('怎么就IE不执行这里呢?郁闷')
var percentVal = percentComplete + '%';
bar.width(percentVal)
percent.html(percentVal);
//console.log(percentVal, position, total);
},
dataType:'json',
error:function(data){
status.html("上传失败");
bar.width('0')
},
success: function(data) {
status.html('上传成功')
bar.width('100%')
} };
// 将options传给ajaxSubmit
$('#formbook').ajaxSubmit(options);
{
var s = $.extend(true, {}, $.ajaxSettings, options, {
contentType: false,
processData: false,
cache: false,
type: method || 'POST'
});
[color=#FF0000]if (options.iframe !== false && (options.iframe || shouldUseFrame))