当前位置: 编程技术>php
php jquery 多文件上传简单实例
来源: 互联网 发布时间:2014-08-26
本文导语: 代码如下:Upload $(document).ready(function() { var settings = { url: "upload.php", method: "POST", allowedTypes:"jpg,png,gif,doc,pdf,zip", fileName: "myfile", multiple: true, onSuccess:function(files,data,xhr) { ...
代码如下:
Upload
$(document).ready(function()
{
var settings = {
url: "upload.php",
method: "POST",
allowedTypes:"jpg,png,gif,doc,pdf,zip",
fileName: "myfile",
multiple: true,
onSuccess:function(files,data,xhr)
{
$("#status").html("Upload is success");
},
onError: function(files,status,errMsg)
{
$("#status").html("Upload is Failed");
}
}
$("#mulitplefileuploader").uploadFile(settings);
});
upload.php
代码如下: