当前位置:网站首页>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
边栏推荐
- Mathematical formula screenshot recognition artifact mathpix unlimited use tutorial
- openresty ngx_lua请求响应
- leecode-学习笔记
- Element positioning of Web Automation
- YML configuration, binding and injection, verification, unit of bean
- PLC编程基础之数据类型、变量声明、全局变量和I/O映射(CODESYS篇 )
- [screen recording] how to record in the OBS area
- February 13, 2022 -5- maximum depth of binary tree
- Calculating the number of daffodils in C language
- The maximum happiness of the party
猜你喜欢
One article deals with the microstructure and instructions of class
数据库基础知识(面试)
The method and principle of viewing the last modification time of the web page
Non rigid / flexible point cloud ICP registration
TypeError: this. getOptions is not a function
Leetcode weekly The 280 game of the week is still difficult for the special game of the week's beauty team ~ simple simulation + hash parity count + sorting simulation traversal
Matlab smooth curve connection scatter diagram
【原创】程序员团队管理的核心是什么?
Selenium+pytest automated test framework practice
2: Chapter 1: understanding JVM specification 1: introduction to JVM;
随机推荐
February 13, 2022 -5- maximum depth of binary tree
数学公式截图识别神器Mathpix无限使用教程
regular expression
数据库基础知识(面试)
Realize reverse proxy client IP transparent transmission
3 find the greatest common divisor and the least common multiple
(4)UART应用设计及仿真验证2 —— TX模块设计(无状态机)
Use of grpc interceptor
Global and Chinese markets for reciprocating seal compressors 2022-2028: Research Report on technology, participants, trends, market size and share
代码农民提高生产力
audiopolicy
Go语言实现原理——锁实现原理
透彻理解JVM类加载子系统
Leetcode daily question 1189 The maximum number of "balloons" simple simulation questions~
一文搞定class的微觀結構和指令
Krypton Factor-紫书第七章暴力求解
(4)UART應用設計及仿真驗證2 —— TX模塊設計(無狀態機)
Ultrasonic sensor flash | LEGO eV3 Teaching
There are 14 God note taking methods. Just choose one move to improve your learning and work efficiency by 100 times!
[digital signal denoising] improved wavelet modulus maxima digital signal denoising based on MATLAB [including Matlab source code 1710]