Javascript 自定义确认弹出窗口无法正常工作
我正在使用插件自定义确认弹出窗口。我可以自定义确认弹出窗口,但问题是,当我单击删除图标时,自定义确认弹出窗口打开,在给出“Javascript 自定义确认弹出窗口无法正常工作,javascript,jquery,html,css,popup,Javascript,Jquery,Html,Css,Popup,我正在使用插件自定义确认弹出窗口。我可以自定义确认弹出窗口,但问题是,当我单击删除图标时,自定义确认弹出窗口打开,在给出“ok”或“cancel”之前,条目立即被删除 我使用的插件来自此url-> 我的代码看起来像 function deleteFeed(url, feed_id) { if(jConfirm("Do you want to delete this feed?")) { $.post(url+'feeds/delete/', {
ok
”或“cancel
”之前,条目立即被删除
我使用的插件来自此url->
我的代码看起来像
function deleteFeed(url, feed_id) {
if(jConfirm("Do you want to delete this feed?")) {
$.post(url+'feeds/delete/',
{
feedid: feed_id
}
, function(response) {
window.location.replace(url+'feeds/index');
});
}
}
需要帮助。您是否注意到他们的演示中使用的功能有所不同?试试这个:
jConfirm("Do you want to delete this feed?", 'Confirmation Dialog', function(r) {
if (r) {
$.post(url+'feeds/delete/',
{
feedid: feed_id
}
, function(response) {
window.location.replace(url+'feeds/index');
});
}
});
试试这个:
jConfirm("Do you want to delete this feed?", 'Confirmation Dialog', function(r) {
if (r) {
$.post(url+'feeds/delete/',
{
feedid: feed_id
}
, function(response) {
window.location.replace(url+'feeds/index');
});
}
});
jConfirm('Do you want to delete this feed?', 'Confirmation Dialog', function(r)
{
if (r)
{
$.post(url+'feeds/delete/',
{
feedid: feed_id
},
function(response) {
window.location.replace(url+'feeds/index');
});
}
});