我想使用jQuery的UI对话框进行确认:
$( "#dialog-confirm" ).dialog({
buttons: {
"Button One": function() {
$( this ).dialog( "close" );
},
"Button Two": function() {
$( this ).dialog( "close" );
}
}
});
});
Run Code Online (Sandbox Code Playgroud)
但我想根据条件更改按钮标签:
if (status == "active") {
var b1 = "Red";
var b2 = "Green";
} else {
var b1 = "Green";
var b2 = "Red";
}
Run Code Online (Sandbox Code Playgroud)
似乎无法将两者结合起来......
| 归档时间: |
|
| 查看次数: |
4730 次 |
| 最近记录: |