kaz*_*aze 18 javascript jquery jquery-ui
是否可以在jQuery UI对话框中设置按钮的ID,以便稍后通过jQuery引用它们?例如,触发事件,禁用等?
... in the dialog setup ...
buttons: {               
    "Sök": function () {
        var bValid = true;
    },
    "OK": function () {
        if (OK()) {
            getStuffNoteringar($("#txtStuffId").val());
            $(this).dialog("close");
        }
    }
.... later on in some javascript code....
$('#OK').click(); 
mpr*_*hat 42
$("#myDialog").dialog({
  buttons :  { 
     "MyButton" : {
         text: "OK",
         id: "okbtnid",
         click: function(){
             var bValid = true;
         }   
      } 
   }
});
| 归档时间: | 
 | 
| 查看次数: | 19648 次 | 
| 最近记录: |