下面是整个页面的代码,总共分为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>
tmhhost放出了2021年的端午佳节+618年中大促的优惠活动:日本软银、洛杉矶200G高防cn2 gia、洛杉矶三网cn2 gia、香港200M直连BGP、韩国cn2,全都是高端优化线路,所有这些VPS直接8折,部分已经做了季付8折然后再在此基础上继续8折(也就是6.4折)。 官方网站:https://www.tmhhost.com 香港BGP线路VPS ,200M带宽 200M带...
hostsailor怎么样?hostsailor成立多年,是一家罗马尼亚主机商家,机房就设在罗马尼亚,具说商家对内容管理的还是比较宽松的,商家提供虚拟主机、VPS及独立服务器,今天收到商家推送的八月优惠,针对所有的产品都有相应的优惠,商家的VPS产品分为KVM和OpenVZ两种架构,OVZ的比较便宜,有这方面需要的朋友可以看看。点击进入:hostsailor商家官方网站HostSailor优惠活动...
最近AS9929线路比较火,联通A网,对标电信CN2,HostYun也推出了走联通AS9929线路的VPS主机,基于KVM架构,开设在洛杉矶机房,采用SSD硬盘,分为入门和高带宽型,最高提供500Mbps带宽,可使用9折优惠码,最低每月仅18元起。这是一家成立于2008年的VPS主机品牌,原主机分享组织(hostshare.cn),商家以提供低端廉价VPS产品而广为人知,是小成本投入学习练手首选。...