0
证实我有这样的jQuery代码:jQuery的负荷点击链接,如果从对话框
$("#deletec-box").dialog({
autoOpen:false,
resizable:false,
height:230,
modal:true,
buttons:{
"Confirm":function(){
window.location=$("a[id*='deletec-confirm']").attr('href');
$(this).dialog("close");
},Cancel:function(){
$(this).dialog("close");
}
}
});
$("a[id*='deletec-confirm']").click(function(){
$("#deletec-box").dialog("open");
return false;
});
而且在网页中我有:
<a href="?action=delc&cid=2" id="deletec-confirm2" title="Delete This Record">Delete</a>
<a href="?action=delc&cid=3" id="deletec-confirm3" title="Delete This Record">Delete</a>
当你点击第二个链接它上面使用首先链接url加载。我怎样才能得到jquery对话框来获取正确的URL基于上面点击的链接?我想要做的就是如果他们点击要求确认的删除链接,如果他们点击对话框中的确认按钮,我想要他们最初点击的URL继续。