jquery-repeaterjQuery 表单

联合创作 · 2023-10-02 10:49

jQuery 重复表单字段。保证表单字段的 name 及 ID 递增。

示例:

//All options are optional.
    new Repeater($('.repeatable'), {
        addSelector: '.repeater-add', //The css selector for the add button.
        removeSelector: '.repeater-remove', //The css selector for the remove button.
        withDataAndEvents: false, //Should data and events on repeatable sections be cloned?
        deepWithDataAndEvents: false, //Should data and events of repeatable sections descendants be cloned?
        addCallback: function(){}, //A callback function that generated repeatable sections will be passed into.
        wrapperHtml: "<div class='repeater-wrap'></div>" //HTML for an element to wrap all repeatable sections in.
    });
浏览 1
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报