如何在Colorbox iframe中禁用链接
how to disable the link in Colorbox iframe?
<a class='iframe' href="delete.php" onClick="chkDel()">
我使用了带有Colorbox的iframe,点击链接后,会弹出一个确认框,代码如下:
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?');"
相关文章:
- 如何使用angularjs在iframe中嵌入来自数据库的视频链接
- 使用Javascript将链接转换为iframe
- 如何防止iframe中的链接在新选项卡中打开
- iframe resizer内部的锚点链接不'不起作用
- 创建使用 ajax 更新 iframe 的链接
- 警报后转到 iframe 中的图像链接
- 取消 iframe 中具有 target=“_parent” 属性的链接事件
- 如何从iframe中删除链接
- 同一域链接正在顶部iFrame中加载,而不是在整个页面上加载
- 用Javascript正则表达式替换iframe到可点击的YouTube链接
- 删除所有<link>iframe中的元素
- 防止iframe破坏会杀死网站上的所有链接
- 按日期为iframe创建一个HTML链接
- iOS Phonegap网页链接嵌入iframe开放系统浏览器,而不是iframe
- Iframe.如何将链接加载到iframe中
- Js从外部域在父级的iframe中打开链接
- 如何告诉 iframe 将图像链接调整为给定的宽度和高度
- 单击链接时播放iframe视频
- 如何在谷歌网站中显示与iframe中的特定人员共享的谷歌云端硬盘html链接
- 在父母的iframe中打开链接/更具体的“_parent”