//创建一个弹出层,title 标题,width 宽度,height 高度,content 内容,url 如果url不为空时则覆盖content加载url页面中的内容
function CreatePopLayerDiv(title,width,height,content,url){
var titles = title || "标题";
var Iheight=$(window).height();
var Iwidth =$(window).width();
var heights = height || 300;
var widths = width || 500;
var Oheight= (Iheight -heights) / 2;
var Owidth = (Iwidth - widths) /2;
var contents = content || "内容";
var div = "
"+titles+"关闭
$(document.body).append(div);
if(url != ""){
$("#Content").load(url);
}
}
//移除弹出层
function RemoveDiv(){
$("#AClose").remove();
$("#HTitle").remove();
$("#offDiv").remove();
$("#InDiv").remove();
}
$(function(){
$("#btnTCC").click(function(){
CreatePopLayerDiv("闪耀的瞬间",600,400,"弹出层","table偶数行变色.html");
});
})
function btnCloses(){
RemoveDiv();
}
相关文章
总结
如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您喜欢交流学习经验,点击链接加入交流1群:1065694478(已满)交流2群:163560250