前回の効果は解除されない(多少見苦しいのは仕方ない)
除去後の効果
実装コード
$(document).ready(function(){ // 弹出框取消域名地址 window.alert = function(name){ var iframe = document.createElement("IFRAME"); iframe.style.display="none"; iframe.setAttribute("src", 'data:text/plain,'); document.documentElement.appendChild(iframe); window.frames[0].window.alert(name); iframe.parentNode.removeChild(iframe); } // 确认框取消域名地址 window.confirm = function (message) { var iframe = document.createElement("IFRAME"); iframe.style.display = "none"; iframe.setAttribute("src", 'data:text/plain,'); document.documentElement.appendChild(iframe); var alertFrame = window.frames[0]; var result = alertFrame.window.confirm(message); iframe.parentNode.removeChild(iframe); return result; }; }); function sc(plId) { if(confirm('该操作数据不可找回,您确定删除吗?')){ $.post('${base}/front/weixin/system/delete.chtml', { plId: plId }, function(data) { var data = eval('(' + data + ')'); if (data.result == "success") { alert("删除成功"); location.reload(); } else { alert(data.msg); } }); }else{ return; } }