日期:2014-05-17 浏览次数:20681 次
//这些是需要加入页面的样式 <style> *{ margin:0; padding:0;} body{ height:100%;} .dis{ background:#cccccc; position:absolute; left:0; right:0; top:0; bottom:0; -moz-opacity:0.5; filter:alpha(opacity=50);z-index:98;} .dis1{ width:400px; height:120px; left:38%; top:40%; position:absolute; margin-left:-50px; margin-top:-25px; z-index:99; border: 1px solid #666666; background-color:#FFFFFF; } </style> //这些是需要加入页面的js方法 <script type="text/javascript"> function submitOrder() { var div = document.createElement("div"); div.className="dis"; div.style.width=document.documentElement.scrollWidth ; div.style.height=document.documentElement.scrollHeight ; document.getElementsByTagName("body")[0].appendChild(div); setTimeout("insert()",2000); } function insert() { var div1 = document.createElement("<div class='dis1'>"); document.getElementsByTagName("body")[0].appendChild(div1); var insert = "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td height='60' align='center' style='font-size:14px'><b>请您在新打开的网上银行页面上完成充值。</b></td></tr>" + "<tr><td height='60' align='center'>" + "<input type='button' style='height:25px;width:80px;font-size:12px' value='完成充值' onClick=location.href='../merchant/TransMan.jsp'>" + " " + "<input type='button' style='height:25px;width:100px;font-size:12px' value='充值遇到问题' onClick=location.href='../merchant/help_question.htm'></td></tr></table>"; div1.innerHTML=insert; } </script>
<body> //然后再页面上调用js方法即可 <a href="javascript:submitOrder();">弹出窗口</a> </body>