javascript - ralat muat naik fail uploadify3.2
高洛峰
高洛峰 2017-07-05 10:47:18
0
1
1152

Uploadify3.2 melaporkan ralat semasa memuat naik fail
Apabila memuat naik fail, JS melaporkan ralat Tidak dapat membaca sifat 'queueData' undefined
Berikut ialah kod, hanya terdapat satu System.out.println("aaa");

dalam Servlet
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="/TestServlet/theme/uploadify.css">
    <script type="text/javascript" src="/TestServlet/JS/jquery-1.12.2.min.js"></script>
    <script type="text/javascript" src="/TestServlet/JS/jquery-1.12.2.js"></script>
    <script type="text/javascript" src="/TestServlet/JS/jquery.uploadify.min.js"></script>
    <script type="text/javascript" src="/TestServlet/JS/jquery.uploadify.js"></script>
    <script type="text/javascript" src="/TestServlet/uploadify/swfobject.js"></script>
    <script>
    $(function(){
          $('file_upload').uploadify({
              queueId:'queue_id',
                swf:'uploadify/uploadify.swf',
                uploader:'/Servlet',
                'onFallback':function(){alert('aaa');}
          });
    });
    
    function upload(){
      //alert(queuedata);
      $('#file_upload').uploadify('upload','*');
    }
    </script>
  </head>
  
  <body>
    <p id="queue_id"></p>
   <input type="file" name="file_upload" id="file_upload" />
   <input type="button" name="doUpload" id="doUpload" value="上传" onclick="upload()"/>
  </body>
</html>

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

membalas semua(1)
巴扎黑

https://stackoverflow.com/que...

Periksa sama ada anda telah memasang denyar.

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan