繁体   English   中英

jQuery Flexigrid更改标签编辑

[英]JQuery Flexigrid change label edit

如何将标签编辑更改为其他文本? 通常,标签为添加,编辑,删除。 当用户单击此链接时,我将更改编辑以查看或显示为我的目标,它将进入编辑表单,但所有字段均为只读(用户无法编辑数据),因此在标题编辑时看起来很奇怪

也许这可以帮助你

    function conditionalDialog(mode){
    var theButtons = {};
    var theautoOpen = true;
    var title = "";

    if (mode=='first'){
        theautoOpen = false;    }
    if (mode=='Add'){
        title = "Add Product Record";
        theButtons["Save"] = function() { simpan('add'); Tambah(); };
        theButtons["Close"] = function() { $(this).dialog("close"); };
    }else{
        title = "Edit Product Record";
        theButtons["Save"] = function() { simpan('edit'); $(this).dialog("close"); };
        theButtons["Cancel"] = function() { $(this).dialog("close"); };
    }
    $('#form').dialog("option","title",title);
    $('#form')
    .dialog({
        autoOpen: theautoOpen,
        width: 600, 
        buttons: theButtons,
        show:"slide"
    }); 
}   

您可以在$('#form')。dialog(“ option”,“ title”,title)行中看到; 它将更改标签

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM