input file change事件调用屡次(解决只执行一次)

$('#upload').replaceWith('<input id="upload" type="file" name="excelFile"/>');
$('#upload').off('change').on('change', function() {//上传
  loadingViewP = layer.load(1, {shade: 0.4});
  $('#uploadform').ajaxSubmit(options, function(data){});
  return false;
});ajax

每一次调用成功以后,替换input file,而后从新绑定change事件excel

相关文章
相关标签/搜索