<Scripttype= "Text/javascript"src=".. /jquery_uploadify/jquery.uploadify-3.1.min.js "></Script> <Linktype= "Text/css"rel= "stylesheet"href=".. /jquery_uploadify/uploadify.css "/> <Scripttype= "Text/javascript"> $(function() { $("#uploadFile"). uploadify ({'SWF':'.. /jquery_uploadify/uploadify.swf', 'cancelimg': '.. /jquery_uploadify/uploadify-cancel.png', 'Uploader':'${ctx}/data/saveuploadfile.do?zybid=${zyb.id}', //' FormData ': {' zybid ': ' ${zyb.id} ',Fileobjname:'UploadFile', 'Method':'Post', Height: -, Width: -, 'Auto': false, 'Filesizelimit':'10MB', 'filetypeexts':'*.xls', 'Filetypedesc':'please upload xls file', 'Multi':false, //' queuesizelimit ': 'ButtonText':'Select File', 'OnSelect': function(file) {},'Onuploadstart':function(file) {},'onuploadprogress' : function(file, bytesuploaded, Bytestotal, totalbytesuploaded, totalbytestotal) { }, 'Onuploaderror': function() {$.messager.alert ('upload failed! Table Style Exception'); }, 'onuploadsuccess': function(File,data,respone) {dosomething (); } }); });
function Submitfile () {
$ (' #fileForm '). Submit ();
$ (' #uploadFile '). Uploadify (' upload ');
}
</script>
<body>
<input type= "File" Name= "UploadFile" id= "UploadFile" >
</body>
File Upload-jquery.uploadify.js