当前位置:网站首页>asp.net弹出层实例
asp.net弹出层实例
2022-07-05 23:02:00 【全栈程序员站长】
大家好,又见面了,我是全栈君
<%@ 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>操作一</li>
<li>操作二</li>
<li><asp:Button ID="btnShow" runat="server" Text="操作三(点击我弹出层)" OnClientClick="return ShowBlock();" /></li>
<li>操作四</li>
<li>操作五</li>
</ul>
</div>
<!--弹出层,-->
<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>
弹出层,平时在隐藏状态,这里能够放控件,载入数据。操作数据等。
</div>
<div>
<asp:Button ID="BtnOperation" runat="server" Text="操作button" OnClientClick="return Operate();"/>
<asp:Button ID="BttCancel" runat="server" Text="关闭" 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>源代码地址:http://download.csdn.net/detail/yayun0516/8264489
版权声明:本文博客原创文章。博客,未经同意,不得转载。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/117540.html原文链接:https://javaforall.cn
边栏推荐
- Activate function and its gradient
- openresty ngx_lua请求响应
- Hj16 shopping list
- What is the process of building a website
- Debian 10 installation configuration
- Southeast Asia e-commerce guide, how do sellers layout the Southeast Asia market?
- Multi sensor fusion of imu/ optical mouse / wheel encoder (nonlinear Kalman filter)
- Metasploit(msf)利用ms17_010(永恒之蓝)出现Encoding::UndefinedConversionError问题
- 透彻理解JVM类加载子系统
- Basic knowledge of database (interview)
猜你喜欢

Masked Autoencoders Are Scalable Vision Learners (MAE)

Expectation, variance and covariance

Error when LabVIEW opens Ni instance finder

PLC编程基础之数据类型、变量声明、全局变量和I/O映射(CODESYS篇 )

一文搞定JVM常见工具和优化策略

Three.js-01 入门

Ultrasonic sensor flash | LEGO eV3 Teaching

SPSS analysis of employment problems of college graduates
![[untitled]](/img/8c/607776e79d66acf9282dca127e12e1.jpg)
[untitled]

Use of metadata in golang grpc
随机推荐
Negative sampling
Initial experience | purchase and activate typora software
Tensor attribute statistics
Déterminer si un arbre binaire est un arbre binaire complet
Methods modified by static
Multi sensor fusion of imu/ electronic compass / wheel encoder (Kalman filter)
Go语言实现原理——锁实现原理
Un article traite de la microstructure et des instructions de la classe
【Note17】PECI(Platform Environment Control Interface)
TypeError: this. getOptions is not a function
判斷二叉樹是否為完全二叉樹
(4)UART应用设计及仿真验证2 —— RX模块设计(无状态机)
Masked Autoencoders Are Scalable Vision Learners (MAE)
2: Chapter 1: understanding JVM specification 1: introduction to JVM;
Go语言实现原理——Map实现原理
Detailed explanation of pointer and array written test of C language
From the perspective of quantitative genetics, why do you get the bride price when you get married
UART Application Design and Simulation Verification 2 - TX Module Design (Stateless machine)
Douban scoring applet Part-2
PLC编程基础之数据类型、变量声明、全局变量和I/O映射(CODESYS篇 )