如何删除jquery模态表单,并保持它作为简单的HTML表单在页面的底部

how to remove jquery modal form and keep it as simple html form at the bottom of page

本文关键字:表单 简单 HTML 底部 删除 何删除 jquery 模态      更新时间:2023-09-26

如何删除这个jquery对话框,并显示为一个简单的HTML表单在网页的底部,当点击按钮。我有一个引导表,当我点击添加新记录按钮,它显示对话框模式,但我想使它简单的html表单没有弹出

$(function () {
    var new_dialog = function (type, row) {
        var dlg = $("#dialog-form").clone();
        var email = dlg.find(("#email")),
            password = dlg.find(("#password"));
        type = type || 'Create';
        var config = {
            autoOpen: true,
            height: 400,
            width: 450,
            modal: true,
            buttons: {
                "Create an account": save_data,
                    "Cancel": function () {
                    dlg.dialog("close");
                }
            },
            close: function () {
                dlg.remove();
            }
        };
        if (type === 'Edit') {
            config.title = "Edit User";
            get_data();
            delete(config.buttons['Create an account']);
            config.buttons['Edit account'] = function () {
                row.remove();
                save_data();
            };
        }
        dlg.dialog(config);

不确定是否有效,但请尝试。设置falsemodal属性,在config中增加positiontop属性;

modal: false,
position: 'relative',
top: 0,

或者,在html代码中删除具有模态内容的Div的class属性。