我目前正在处理多个php图片上传但使用此SITE我无法弄清楚,如果我可以从3个增加到4个文件上传输入?我查看了所有文件但没有发现任何相关内容。之前使用此SITE示例的任何人都可以帮助我吗?
Jquery的
(function($) {
$(document).ready(function() {
// it must be checked if there are div.imageForms because the
// uploaderPreviewer javascript may be not included and produce an error
if ($('div.imageForms').length) {
$('div.imageForms').append($.uploaderPreviewer.createImageForms());
// the images are populated if the admin form is to edit, and not
// to insert
if ($('div.imageForms[images]').length) {
var imageFilenames = $('div.imageForms[images]').attr('images').split(',');
$.uploaderPreviewer.populateImages(imageFilenames);
$('div.imageForms[images]').removeAttr('images');
}
}
$('#buttonSave').click(function() {
var itemId = $(this).attr('itemId');
if (itemId) {
$.itemForm.update(itemId);
}
else {
$.itemForm.insert();
}
});
});
})(jQuery);
</script>
HTML
<html>
<div class="imageForms"></div>
<div class="buttonSave">
<button id="buttonSave">Upload</button>
</div>
</div>
</html>
答案 0 :(得分:1)
加载DOM后,您可以操作$ .uploaderPreviewer对象选项。您所要做的就是:
$.uploaderPreviewer.formsCount = 4;
请参阅修订后的代码。