jQuery .append()不使用jQuery文件上传

时间:2016-02-08 10:19:15

标签: jquery laravel jquery-file-upload

我正在使用jQuery文件上传,并且在成功时我试图将隐藏的输入字段附加到表单但它不起作用,该元素未被附加。

jupload.fileupload({
    // Uncomment the following to send cross-domain cookies:
    //xhrFields: {withCredentials: true},
    url: '/content/upload',
    done: function (e, data) {
            $("#fileupload").append('<input type="hidden" name="uploaded_files[]">');

        }
});

HTML:

<form action="create-submit" id="fileupload" method="POST" enctype="multipart/form-data">
...
</form>

0 个答案:

没有答案