<script src="_script/jquery.colorbox.js"></script>
<link type="text/css" media="screen" rel="stylesheet" href="_script/jquery.colorbox.css" />
<script type="text/javascript">
$(function() {
$(".user_x").colorbox({ //指定弹窗标签
iframe : true,
innerWidth : 506,
innerHeight : 580
});
});
function checkclick(msg) {
confirm(msg) ? event.returnValue = true : event.returnValue = false;
}
</script>
php中退出插件。完成更新父页面操作。
<?php
//$info 页面表单提交返回结果
if(is_numeric($info)){
exit("<script language='javascript'>alert('添加成功');parent.parent.\$.fn.colorbox.close();</script>");
}else{
exit("<script language='javascript'>alert('添加失败');parent.location.reload();</script>");
}
本文介绍如何使用 jQuery Colorbox 插件创建弹窗,并通过 PHP 实现弹窗关闭及页面刷新功能,详细解释了弹窗的配置参数与交互逻辑。
1334

被折叠的 条评论
为什么被折叠?



