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

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

大家讲道理
大家讲道理

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

membalas semua(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>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan
Tentang kita Penafian Sitemap
Laman web PHP Cina:Latihan PHP dalam talian kebajikan awam,Bantu pelajar PHP berkembang dengan cepat!