更新时间:2022-12-02 18:33:12
您可以获得href属性: $('#deletec-confirm ').attr('href');
You can get the href attribute with: $('#deletec-confirm').attr('href');
您的代码现在如下:
$("#deletec-box").dialog({
autoOpen: false,
resizable: false,
height:230,
modal: true,
buttons: {
"Confirm": function() {
window.location = $('#deletec-confirm').attr('href');
$(this).dialog("close");
},
Cancel: function() {
$(this).dialog("close");
}
}
});
$("#deletec-confirm").click(function() {
$("#deletec-box").dialog("open");
return false;
});