点击按钮弹出层

 

<script>
function msg(info){
var p=document.createElement("DIV");
if (!info)
p.id="p";
p.style.position="absolute";
p.style.width=document.body.scrollWidth;
p.style.height=(document.body.offsetHeight>document.body.scrollHeight)?'100%':document.body.scrollHeight;
p.style.zIndex='998';
p.style.top='0px';
p.style.left='0%';
p.style.backgroundColor="#d1d1d1";
p.style.opacity='0.5';
p.style.filter="alpha(opacity=40)";
document.body.appendChild(p);
var p1=document.createElement("DIV");
var top=parseInt(parseInt(document.body.scrollHeight)*0.25)+document.body.scrollTop;
p1.style.position="absolute";
p1.style.width="300px";
p1.id="p1";
var left=Math.ceil(((document.body.scrollWidth)-parseInt(p1.style.width.replace('px','')))/2)+document.body.scrollLeft;
p1.style.height="100px";
p1.style.zIndex='999';
p1.style.top=top+'px';
  p1.style.left=left+'px';
p1.style.border="0px solid #dedede";
var html="";
  html+="<center>"

  html+="<div class='p1' style='overflow:hidden;background:url(image/divbg.jpg) repeat-x; height:25px;width:295px;border-left:1px solid #cccccc;border-right:1px solid #cccccc;color:#333;font-size:12px;font-weight:bold;text-align:left; line-height:25px; padding-left:5px;'> 提示窗口</div>"
html+="<div id='c' style='height:150px;width:300px;background-color:#ffffff;overflow:hidden;border-left:1px solid #cccccc;border-right:1px solid #cccccc;'>"+"<div style='width:200px; margin:10px auto 0 auto; font-size:14px; color:red; line-height:25px; text-align:center;font-family:'宋体';'>恭喜您!提交成功!</div>"+"<div style='width:280px; margin:0 auto; font-size:14px; color:#333333; line-height:25px; text-align:center;'>您的数字编号为:<span style='font-family:Arial, Helvetica, sans-serif; color:#0970d0;  font-size:16px; font-weight:bold;'>2536 2505 6987</span></div>"+"<div style='font-size:12px; color:#ff0000; width:280px;margin:0 auto; line-height:25px;font-family:'宋体';'>友情提示:凭编码可以换取打折门票。</div>"+"<br><br><br>[ <a href='javascript:this.cancle()'>关闭</a> ]</div>"
 html+="<div class='p1' style='height:1px;overflow:hidden;background:#ffffff;width:298px;border-left:1px solid #cccccc;border-right:1px solid #cccccc;'></div>"

  html+="</center>"
document.body.appendChild(p1);
p1.innerHTML=html;
var arr=document.getElementsByTagName("select");
var i=0;
while(i<arr.length){
  arr[i].style.visibility='hidden';
  i++;
}
this.cancle=function(){
document.body.removeChild(document.getElementById('p'));
document.body.removeChild(document.getElementById('p1'));
var arr=document.getElementsByTagName("select");
  var i=0;
  while(i<arr.length){
  arr[i].style.visibility='visible';
  i++;
  }
}
}
</script>


 <a href="#" οnfοcus="this.blur()"><img src="image/tj_btn.jpg" width="79" class="ptd" onClick='msg()' /> </a>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值