添加按钮到jquery ui对话框

我无法添加按钮到这个 jquery ui对话框.
如果可能,请给我一个例子.
谢谢.

<script type="text/javascript">
    $(document).ready(function () {
        //setup new person dialog
        $('#dialog2').dialog({
            autoResize: true,
            show: "clip",
            hide: "clip",
            height: 'auto',
            width: '1000',
            autoOpen: false,
            modal: true,
            position: 'top',
            draggable: false,
            title: "انتخاب درخواست",
            open: function (type, data) {
                $(this).parent().appendTo("form");
            }
        });

        $('#viewfaktor').dialog({
            autoResize: true,
            show: "clip",
            hide: "clip",
            height: 'auto',
            width: '1000',
            autoOpen: false,
            modal: true,
            position: 'top',
            draggable: true,
            title: "مشاهده صورت ریز",
            open: function (type, data) {
                $(this).parent().appendTo("form");
            }
        });


        $('#msgBox').dialog({


            autoResize: true,
            show: "clip",
            hide: "clip",
            height: 'auto',
            width: 'auto',
            autoOpen: false,
            modal: true,
            position: 'center',
            draggable: false,



            open: function (type, data) {
                $(this).parent().appendTo("form");
            }


        });



    });

    function showDialog(id) {
        $('#' + id).dialog("open");
    }

    function closeDialog(id) {
        $('#' + id).dialog("destroy");
    }



</script>
$('#msgBox').dialog({
    autoResize: true,
    show: "clip",
    hide: "clip",
    height: 'auto',
    width: 'auto',
    autoOpen: false,
    modal: true,
    position: 'center',
    draggable: false,

    open: function (type, data) {
        $(this).parent().appendTo("form");
    },

    buttons: { "OK": function() { $(this).dialog("close"); } } 
});
相关文章
相关标签/搜索