[英]how to disable the link in Colorbox iframe?
<a class='iframe' href="delete.php" onClick="chkDel()">
我将iframe与Colorbox一起使用,单击链接后,我将弹出一个类似于代码的确认框:
function chkDel(){
if(!confirm("delete?")){
//how to stay in the current state?
//and do not run the delete page
}
}
如果用户取消,则返回false。 返回false将阻止执行。
function chkDel(){
if(!confirm("delete?")){
return false;
}
}
您甚至可以在onClick属性内的一行中完成此操作。
onClick="return confirm('Are you sure about deleting this?');"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.