function getRange() //得到屏幕的大小
{
var top = document.body.scrollTop;
var left = document.body.scrollLeft;
var height = document.body.clientHeight;
var width = document.body.clientWidth;
if (top == 0 && left == 0 && height == 0 && width == 0) {
top = document.documentElement.scrollTop;
left = document.documentElement.scrollLeft;
height = document.documentElement.clientHeight;
width = document.documentElement.clientWidth;
}
return { top: top, left: left, height: height, width: width };
}
function jquery(id) {
return (document.getElementById) ? document.getElementById(id) : document.all[id];
}
function show() //根据屏幕的大小显示两个层
{
var range = getRange();
jquery('doing').style.width = range.width + "px";
jquery('doing').style.height = range.height + "px";
jquery('doing').style.display = "block";
document.getElementById("divList").style.display = "block";
getchannel();
}
function showNo() //隐藏两个层
{
document.getElementById("doing").style.display = "none";
document.getElementById("divList").style.display = "none";
}
<%--DIV Begin--%>
<div id="doing" style="filter: alpha(opacity=30); -moz-opacity: 0.3; opacity: 0.3; background-color: #000; width: 100%; height: 100%; z-index: 1000; position: absolute; left: 0; top: 0; display: none; overflow: hidden;">
</div>
<div id="divList" style="border: solid 2px rgb(11, 85, 159); background: #fff; width: 460px; height: 420px; z-index: 1001; position: absolute; left: 50%; margin-left: -300px;">
<div id="divtitle" style="height: 30px; line-height: 30px; background: rgb(11, 85, 159); position: relative; z-index: 1002; font-size: 15px; padding: 0 10px; color: #fff; font-weight: bold;">
<asp:Label ID="Label1" runat="server" Text="参数"></asp:Label>
<a style="width: 15px; height: 15px; display: block; background: url(../images/close.png) no-repeat 0 0; position: absolute; top: 6px; right: 5px;" href="javascript:showNo();" οnclick=" showNo()"></a></div>
<div id="check123"
style="height: 320px; padding: 15px; text-align: left; vertical-align: middle;">
<div style="height: 300px; overflow: scroll;">
<table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
<tr class="table_none">
<td class="style4">发件人姓名:</td>
<td>
<asp:TextBox ID="txtSend_Name" Width="196px" runat="server"></asp:TextBox></td>
</tr>
<tr class="table_none">
<td class="style4">发件人邮编:</td>
<td>
<asp:TextBox ID="txtSend_Postcode" Width="196px" runat="server"></asp:TextBox></td>
</tr>
<tr class="table_none">
<td class="style4">发件人电话:</td>
<td>
<asp:TextBox ID="txtSend_Phone" Width="196px" runat="server"></asp:TextBox></td>
</tr>
<tr class="table_none">
<td class="style4">发件人手机:</td>
<td>
<asp:TextBox ID="txtSend_Mobile" Width="196px" runat="server"></asp:TextBox></td>
</tr>
<tr class="table_none">
<td class="style4">发件人邮箱:</td>
<td>
<asp:TextBox ID="txtSend_Email" Width="196px" runat="server"></asp:TextBox></td>
</tr>
</table>
</div>
<div valign="middle" style="padding-top: 10px; padding-left: 128px;">
<asp:Button ID="BtnSavbe" runat="server" Text="保 存" OnClientClick="return Saveclick();" CssClass="btn1 btn2"
Visible="True" OnClick="BtnSave_Click" />
</div>
</div>
</div>
<%--DIV End--%>
//打开Page.RegisterStartupScript("new", "<script>show()</script>");
//或者<input type=button id="bb" οnclick=" show()"/>
弹幕
最新推荐文章于 2024-04-01 23:08:32 发布