ext java 多文件上传

导入相应的ext js
<link rel= "stylesheet" type= "text/css" href= "<%=basePath%>ext/ux/UploadDialog/css/Ext.ux.UploadDialog.css" />
<link rel= "stylesheet" type= "text/css" href= "<%=basePath%>ext/ux/ProgressBar/Ext.ux.ProgressBar.css" />
<script type= "text/javascript" src= "<%=basePath%>ext/adapter/prototype/prototype.js"></script>
<script type= "text/javascript" src= "<%=basePath%>ext/adapter/jquery/jquery.js"></script>
<script type= "text/javascript" src= "<%=basePath%>ext/adapter/ext/ext-base.js"></script>
<script type= "text/javascript" src= "<%=basePath%>ext/ux/UploadDialog/Ext.ux.UploadDialog.js"></script>
<script type= "text/javascript" src= "<%=basePath%>ext/ux/ProgressBar/Ext.ux.ProgressBar.js"></script>
jsp代码
<input type= "button"    value= "上传数据文件" onclick= "upload()" style= "width: 100px;height: 30px">


<script type= "text/javascript">
   function upload(){
    dialog = new Ext.ux.UploadDialog.Dialog({
                         autoCreate: true,
                         closable: true,
                         collapsible: false,
                         draggable: true,
                         minWidth: 400,            
                         minHeight: 200,
                         width: 400,
                         height: 350,
                         proxyDrag: true,
                         modal: true ,
                         resizable: true,
                         constraintoviewport: true,
                         permitted_extensions:[ 'JPG' , 'jpg' , 'jpeg' , 'JPEG' , 'GIF' , 'gif' , 'png' , 'PNG' ],    
                         title: '文件上传队列对话框',
                         url: "",
                         reset_on_hide: false,
                         allow_close_on_upload: true
                     });    
    dialog.show();
  }  

本文出自 “PerfectIsShit” 博客,谢绝转载!

你可能感兴趣的:(ext,strut2,多文件上传)