我在获取单击元素的 href 并将其传递给函数时遇到了一些问题,这是我以前没有做过的事情,所以我尽力了,但没有得到它。有任何想法吗?
$('#smoke_confirm').click(function(e){
var href = $(this).attr("href");
tstconfirm(href);
e.preventDefault();
});
function tstconfirm(href){
smoke.confirm('Are you sure you want to delete?',function(e){
if (e){
window.location = $(href);
}
}, {cancel:"cancel", ok:"confirm"});
}