下面是整个页面的代码,总共分为CSS和Javascript和HTML三部份复制后运行就可以了里面有个背景图要自己换掉。
#alertdiv{position:absolute;height:450px;width:400px;z-index:9999; left:50%;margin-left:-200px;padding:1 px;border:1 px#ccc sol id; font-size:12px;display:none;background-color:#FFFFFF}
#alertdiv h2{position:relative; height:23px;background-color:#E4E4E4;font-size:12px;padding:0;padding-left:5px; l ine-height:23px;margin:0; }
#alertdiv h2 a{position:absolute;display:block;right:5px; top:3px;display:block;margin:0;width:16px;height:16px;margin:0;padding:0;overflow:hidden;backgrou nd:u rl(images/icon/action_delete.gif) no-repeat;cursor:pointer; text-indent:-999px}
.forminfo{padding:5px;}
. inputR{width:120px;}
.bg{background-color:#CCC;-moz-opacity:0.5; fi lter:alpha(opacity=50);height:10000px;width:120%;position:absolute;z-index:9998; left:0; top:0;display:none}function alertinfo(id){
//显示弹出层var obj=document.getElementById(id);var W=screen.width;//取得屏幕分辨率宽度var H=screen.height;//取得屏幕分辨率高度var yScrol l ;//取滚动条高度if (se lf.p a geYOffs et) {yScrol l=self.pageYOffset;
}else if (document.documentElement&&document.documentElement.scrollTop){yScrol l=document.documentElement.scrol lTop;
}else if (document.body) {yScrol l=document.body.scrollTop;
}
//obj.style.marginL eft=(W/2-200)+"px";obj.style.top=(H/2-90-225 + yScrol l)+"px";document.getElementById("bg").style.display="block";obj.style.display="block";var scrollstyle=scrolls();scrol lstyle.style.overflowX="hidden";scrol lstyle.style.overflowY="hidden";
}function closediv(id){
//关闭弹出层
document.getElementById(id).style.display="none";document.getElementById("bg").style.display="none";var scrollstyle=scrolls();scrol lstyle.style.overflowY="auto";scrol lstyle.style.overflowX="hidden";
}function scrol ls(){
//取浏览器类型var temp_h1 =document.body.cl ientHeight;var temp_h2=document.documentElement.cl ientHeight;var isXhtml=(temp_h2<=temp_h1&&temp_h2!=0)?true:false;var htmlbody=isXhtml?document.documentElement:document.body;return htmlbody;
}
<div class="bg" id="bg"></div>
<div id="alertdiv">
<h2>请填写表单信息<a href="javascript:closediv('alertdiv')" title="关闭">关闭</a></h2><div class="forminfo">
<table width="100%"border="0"al ign="center"cel lpadding="5">
<form id="form1"name="form1"method="post"action="">
<tr>
<td width="21%"al ign="right">字段一 </td>
<td width="41%"><input type="text"name="textfield" id="textfield"class="inputR"/></td><td width="38%"> </td>
</tr>
<tr>
<td al ign="right">字段三 </td>
<td><input type="text"name="textfield2" id="textfield2"class="inputR"/></td>
<td> </td>
</tr>
<tr>
<td al ign="right">字段四 </td>
<td><input type="text"name="textfield3" id="textfield3"class="inputR"/></td><td> </td>
</tr>
<tr>
<td al ign="right">字段五 </td>
<td><input type="text"name="textfield4" id="textfield4"class="inputR"/></td><td> </td>
</tr>
<tr>
<td al ign="right"> </td>
<td colspan="2"><label><input type="submit"name="button" id="button"value="提交" /></label>
<label><input type="reset"name="button2" id="button2"value="重置" /></label></td></tr>
</fo r m>
</table>
</div>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>; </p>
<p> </p>
<p><a href="javascript:alertinfo('alertdiv');">显示弹出层</a></p>
DogYun是一家2019年成立的国人主机商,提供VPS和独立服务器租用等,数据中心包括中国香港、美国洛杉矶、日本、韩国、德国、荷兰等,其中VPS包括常规VPS(经典云)和按小时计费VPS(动态云),使用自行开发的面板和管理系统,支持自定义配置,动态云各个硬件独立按小时计费,带宽按照用户使用量计费(不使用不计费)或者购买流量包,线路也可以自行切换。目前商家发布了6.18促销方案,新购动态云7折,经...
RAKsmart怎么样?RAKsmart机房即日起开始针对洛杉矶机房的独立服务器进行特别促销活动:低至$76.77/月,最低100Mbps带宽,最高10Gbps带宽,优化线路,不限制流量,具体包括有:常规服务器、站群服务器、10G大带宽服务器、整机机柜托管。活动截止6月30日结束。RAKsmart,美国华人老牌机房,专注于圣何塞服务器,有VPS、独立服务器等。支持PayPal、支付宝付款。点击直达...
Hostadvice主机目录对我们的服务进行了测试,然后给PQ.hosting颁发了十大WordPress托管奖。为此,宣布PQ.Hosting将在一周内进行折扣优惠,购买和续订虚拟服务器使用优惠码:Hostadvice ,全部优惠10%。PQ.hosting,国外商家,成天于2019年,正规公司,是全球互联网注册商协会 RIPE 的成员。主要是因为提供1Gbps带宽、不限流量的基于KVM虚拟的V...