简单弹出层
.black_overlay { display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index: 1001; -moz-opacity: 0.8; opacity: .80; filter: alpha(opacity=20); } .white_content { display: none; position: absolute; top: 35%; left: 40%; width: 240px; height: 150px; padding: 0; border: 1px solid #797979; background-color: white; z-index: 1002; overflow: auto; }
<div id="light" class="white_content"> <div style="background-color:#00ccff; height:20px; vertical-align:middle; line-height:20px;"> 添加到黑名单 </div> <table border="0" cellpadding="0" cellspacing="0" style="padding:2px 0 0 2px;"> <tr> <td style="height:25px;"> 股票代码: </td> <td> <input id="txtsecuCode" type="text" onblur="ShowsecuName();" /> </td> </tr> <tr> <td style="height:25px;"> 股票名称: </td> <td> <div id="txtsecuName" style="color:Red;"></div> </td> </tr> <tr> <td style="height:25px;"> 所属板块: </td> <td> <div id="txtblock" style="color:Red;"></div> </td> </tr> <tr> <td style="height:25px;"> <input id="chkjin" type="checkbox" value="1" />金账户 </td> <td> <input id="chkyin" type="checkbox" value="2" />银账户 </td> </tr> <tr> <td colspan="2" align="center" style="height:25px;"> <input id="btnAddBlack" onclick="AddStockBlack();" type="button" value="确定" /> <input id="btnExit" onclick="Exit();" type="button" value="取消" /> </td> </tr> </table> </div> <div id="fade" class="black_overlay"> </div>
//弹出层 function showMsg() { $("#light").css("display","block"); $("#fade").css("display","block"); }