当前位置:网站首页>asp. Net pop-up layer instance
asp. Net pop-up layer instance
2022-07-05 23:15:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestASPNetNewBlock._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ul>
<li> Operation 1 </li>
<li> Operation two </li>
<li><asp:Button ID="btnShow" runat="server" Text=" Operation three ( Click me to pop up the layer )" OnClientClick="return ShowBlock();" /></li>
<li> Operation 4 </li>
<li> Operation 5 </li>
</ul>
</div>
<!-- Pop-up layer ,-->
<div id="divNewBlock" style=" border:solid 1px;padding:10px;width:600px;z-index:1001;
position: absolute; display:none;top:50%; left:10%;margin:-50px;">
<div style="padding:3px 15px 3px 15px;text-align:left;vertical-align:middle;" >
<div>
Pop-up layer , Usually in a hidden state , Controls can be placed here , Load data . Operation data, etc .
</div>
<div>
<asp:Button ID="BtnOperation" runat="server" Text=" operation button" OnClientClick="return Operate();"/>
<asp:Button ID="BttCancel" runat="server" Text=" close " OnClientClick="return HideBlock();" />
</div>
</div>
</div>
</form>
</body>
<script type="text/javascript" language="javascript">
function HideBlock() {
document.getElementById("divNewBlock").style.display = "none";
return false;
}
function ShowBlock() {
var set = SetBlock();
document.getElementById("divNewBlock").style.display = "";
return false;
}
function SetBlock() {
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 Operate() {
return false;
}
</script>
</html>
Source code address :http://download.csdn.net/detail/yayun0516/8264489
Copyright notice : This article is an original blog article . Blog , Without consent , Shall not be reproduced .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/117540.html Link to the original text :https://javaforall.cn
边栏推荐
- Use of grpc interceptor
- Krypton Factor-紫书第七章暴力求解
- How to quickly understand complex businesses and systematically think about problems?
- 二叉树递归套路总结
- CJ mccullem autograph: to dear Portland
- Realize reverse proxy client IP transparent transmission
- Selenium+Pytest自动化测试框架实战
- Metasploit (MSF) uses MS17_ 010 (eternal blue) encoding:: undefined conversionerror problem
- VS2010编写动态链接库DLL和单元测试,转让DLL测试的正确性
- openresty ngx_lua正則錶達式
猜你喜欢
Three.js-01 入门
Use of metadata in golang grpc
From the perspective of quantitative genetics, why do you get the bride price when you get married
Sum of two numbers, sum of three numbers (sort + double pointer)
LeetCode145. Post order traversal of binary tree (three methods of recursion and iteration)
2:第一章:认识JVM规范1:JVM简介;
Using LNMP to build WordPress sites
Three. Js-01 getting started
Selenium+pytest automated test framework practice
Registration of Electrical Engineering (elementary) examination in 2022 and the latest analysis of Electrical Engineering (elementary)
随机推荐
3D reconstruction of point cloud
Finally understand what dynamic planning is
3D point cloud slam
Element operation and element waiting in Web Automation
openresty ngx_lua正则表达式
Hcip day 11 (BGP agreement)
Déterminer si un arbre binaire est un arbre binaire complet
[speech processing] speech signal denoising and denoising based on MATLAB low-pass filter [including Matlab source code 1709]
Activate function and its gradient
Thoroughly understand JVM class loading subsystem
Idea rundashboard window configuration
Nacos 的安装与服务的注册
Use of shell:for loop
一文搞定JVM常见工具和优化策略
一文搞定class的微觀結構和指令
判断二叉树是否为完全二叉树
数学公式截图识别神器Mathpix无限使用教程
Shell: operator
Go语言实现原理——锁实现原理
UART Application Design and Simulation Verification 2 - TX Module Design (Stateless machine)