簡體   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