//去除自带close按钮
$.colorbox({href:"mailboxActivate.htm",overlayClose:false,onLoad: function() {
$('#cboxClose').remove();}},function(){
document.getElementById("alemail").innerHTML = data.alemail;
document.getElementById("offemail").href = "http://"+data.offemail;
}
);
//替换alert弹出框
<link href="/web/colorbox.css" rel="stylesheet" type="text/css" />
<script src="/web/jquery/jquery.colorbox-min.js" type="text/javascript"></script>
$.colorbox({href:"#inline_content",inline:true,overlayClose:false, width:"25%", onClosed: function(){
location.href = "/web/index.htm";
}
});
<div style='display:none'>
<div id='inline_content' style='padding:10px; background:#fff;'>
<p><strong>请先登录</strong></p>
</div>
</div>