$("#dialog-cust-grp,#dialog-cust-nm").dialog({
open: function(event, ui) {
$("a.ui-dialog-titlebar-close").remove();
},
bgiframe: true,autoOpen: false,closeOnEscape: false,
resizable: false,modal: true,show: "drop",hide: "drop",
draggable: false,zIndex: 10000,
buttons: {'Ok': function() {$(this).dialog("close");
if (selector is #dialog-cust-nm){
alert(“hello....”);
}
}
});
基于上面的代码,它有两个不同的选择器,即$("#dialog-cust-grp,#dialog-cust-nm")
有没有一种方法可以检查调用中实际使用了哪个选择器,.dialog()
因为我需要一种方法来做上面这样的事情,即
If (selector is #dialog-cust-nm){
alert(“hello....”);
}
这可能吗?