📜  formdata 对象数组 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:17.061000             🧑  作者: Mango

代码示例2
function createFormData(formData, key, data) {
    if (data === Object(data) || Array.isArray(data)) {
        for (var i in data) {
            createFormData(formData, key + '[' + i + ']', data[i]);
        }
    } else {
        formData.append(key, data);
    }
}