jquery UI dialoag 窗口 建表 提交 (学习记录)

来源:互联网 发布:178数据库7.0 编辑:程序博客网 时间:2024/06/18 05:12
$(function sysAdmin_menu_addFun() {
        $('#Dialog').dialog({
            title: '发送邮件',
            width: 400,   
            height: 300,
            closed: false,
            href: '',  
            modal: true,
            buttons:[{
                text:'发送',
                iconCls:'icon-ok',
                handler:function() {
                    $('#send_addForm').form('submit', {
                        url:'send.action',
                        success:function(data) {
                        
                            var result = $.parseJSON(data);
                                if (result) {
                                    $('#Dialog').dialog('destroy');
                                    $.messager.show({
                                        title : '提示',
                                        msg : result.msg
                                    });
                                } else {
                                    $('#Dialog').dialog('destroy');
                                    $.messager.alert('提示', result.msg);
                                }
                        }
                    });
                }
            },{
                text:'取消',
                iconCls:'icon-cancel',
                handler:function() {
                    $('#Dialog').dialog('destroy');
                }
            }],
            onClose:function() {
                $(this).dialog('destroy');
            }
        });

    });


<div id="Dialog">
    <form id="send_addForm" method="post"  enctype="multipart/form-data">
    <table style="padding-top: 5px; padding-left: 20px">
        <tr>
            <td>
                添加附件:
            </td>
            <td>
                <input  name="upload" type="file"
                    class="easyui-validatebox" style="width: 250px;" />
            </td>
        </tr>
    </table>
</form>

</div>



0 0