Posted in Javascript onDecember 05, 2013
用法
1. add js and css style
<link href="~/Dropzone/css/basic.css" rel="stylesheet" /> <link href="~/Dropzone/css/dropzone.css" rel="stylesheet" /> <script src="~/Dropzone/dropzone.min.js"></script>
2. post data
<form action="~/Home/SaveUploadedFile" method="post" enctype="multipart/form-data" class="dropzone" id="dropzoneForm"> </form>
3.handling Server Response
<script type="text/javascript"> Dropzone.options.dropzoneForm = { init: function () { this.on("complete", function (data) { var res = eval('(' + data.xhr.responseText + ')'); alert(res.Message); }); } }; </script>
4.支持较旧的浏览器.same ie6
javascript拖拽上传类库DropzoneJS使用方法
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@