我完全坚持Dropzone.js,我想创建一个拖放文件上传
设置就好了
<form id='test' enctype="multipart/form-data">
<input type="text" name="album_name">
<div id="myId" class="dropzone">
</div>
<button type="submit" id="newAlbum">go go</button>
</form>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://malsup.github.com/jquery.form.js" type="text/javascript" charset="utf-8"></script>
<script src="https://raw.github.com/enyo/dropzone/master/downloads/dropzone.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#myId").dropzone({
paramName: 'photos',
url: "post.php",
dictDefaultMessage: "Drag your images",
clickable: true,
enqueueForUpload: true,
selectedfiles: function()
{
$('#newAlbum').show();
}
});
});
</script>
但我不知道要序列化表格并发送它
请有人给我看一个例子吗?