zoukankan
html css js c++ java
使用半透明的DIV实现禁用页面功能(转)
实现功能:弹出一个DIV层提示等待信息,这个时候禁用用户操作页面中的其他内容。
弹出DIV:
<
div
id
="divWaiting"
style
="display: none; z-index: 1100; left: 25%; right: 25%; position: absolute;
text-align: center; 50%; height: 50px; border-right: #009900 1px solid;
border-top: #009900 1px solid; border-left: #009900 1px solid; border-bottom: #009900 1px solid;
background-color: #f9fff6; left: expression((this.offsetParent.clientWidth/2)-(this.clientWidth/2)+this.offsetParent.scrollLeft);
top: expression((this.offsetParent.clientHeight/2)-(this.clientHeight/2)+this.offsetParent.scrollTop);"
>
<
br
>
The system is dealing with your request, please waiting
</
div
>
弄一个全屏的DIV来覆盖页面:
<
div
id
="divDisable"
style
="display: none;expression(document.body.offsetWidth);height:expression(document.body.offsetHeight); z-index: 1000; position: absolute;left: 0px; top: 0px;filter:alpha(opacity=50); background-color:White"
></
div
>
点击按钮的操作:
document.getElementById("divWaiting").style.display="";
document.getElementById("divDisable").style.display="";
其他处理:
function ChangeDiv()
{
document.getElementById("divDisable").style.height=document.body.offsetHeight+document.body.scrollTop;
}
window.onscroll=ChangeDiv;
查看全文
相关阅读:
每日日报2020.12.1
每日日报2020.11.30
981. Time Based Key-Value Store
1146. Snapshot Array
565. Array Nesting
79. Word Search
43. Multiply Strings
Largest value of the expression
1014. Best Sightseeing Pair
562. Longest Line of Consecutive One in Matrix
原文地址:https://www.cnblogs.com/skyblue/p/1187691.html
最新文章
把表和索引移动到不同的表空间
alias 中使用 awk
jsp常用知识点总结
遍历结果返回集的两种方法
@WebServlet("/servlet")
404
<A class=menuChild href="quanxianServlet?method=list" target=main>权限管理</A>
div
response.getWriter().append("Served at: ").append(request.getContextPath());
报错:Unhandled exception type UnsupportedEncodingException
热门文章
返回结果集ResultSet
--
期末总结
每日日报2020.12.10
每日日报2020.12.9
每日日报2020.12.8
每日日报2020.12.7
每日日报2020.12.4
每日日报2020.12.3
每日日报2020.12.2
Copyright © 2011-2022 走看看