javascript - ajaxFileUpload 插件如何在前台限制图片上传大小
大家讲道理
大家讲道理 2017-04-11 09:10:46
0
1
649

ajaxFileUpload 插件如何在前台限制图片上传大小

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
洪涛

<script type="text/javascript">
function UploadCompleteClient(sender, args) {
  var filesize = args.get_fileSize();
  var fileId = args.get_fileId();


  var status = document.getElementById('AjaxFileUpload1_FileItemStatus_' + fileId);

  if (parseInt(filesize) > fileSizeLimit) {

    alert("file exceeds file size limit");
    if (status.innerText) {
      status.innerText = " file exceeds file size limit ";
    }
    if (status.textContent) {
      status.textContent = " file exceeds file size limit ";
    }
  }
}
</script>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!