2011-10-18 49 views
1

如何將標籤編輯更改爲其他文本?通常標籤是添加,編輯,刪除。當用戶點擊此鏈接時,我將更改編輯以查看或顯示爲我的目標,它會轉到編輯表單,但所有字段都是隻讀的(用戶無法編輯數據),因此編輯標題時看起來很奇怪JQuery Flexigrid更改標籤編輯

+0

我已經自己做了這個,非常感謝 – Prast

回答

0

也許這可以幫助ü

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" 
    }); 
} 

U可以在命令行$( '#形式')看到對話框( 「選項」, 「標題」,標題)。 它會改變標籤