📜  内联表单集加 - 任何代码示例

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

代码示例1
$('#add_more').click(function() {
    var form_idx = $('#id_form-TOTAL_FORMS').val();
    $('#form_set').append($('#empty_form').html().replace(/__prefix__/g, form_idx));
    $('#id_form-TOTAL_FORMS').val(parseInt(form_idx) + 1);
});