当前位置:网站首页>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
边栏推荐
- [digital signal denoising] improved wavelet modulus maxima digital signal denoising based on MATLAB [including Matlab source code 1710]
- Leetcode daily question 1189 The maximum number of "balloons" simple simulation questions~
- Global and Chinese market of water treatment technology 2022-2028: Research Report on technology, participants, trends, market size and share
- openresty ngx_lua正则表达式
- 14种神笔记方法,只需选择1招,让你的学习和工作效率提高100倍!
- 6-axis and 9-axis IMU attitude estimation
- LeetCode102. Sequence traversal of binary tree (output by layer and unified output)
- Nacos installation and service registration
- openresty ngx_lua请求响应
- 一文搞定垃圾回收器
猜你喜欢
Three.js-01 入门
Thoroughly understand JVM class loading subsystem
东南亚电商指南,卖家如何布局东南亚市场?
一文搞定class的微观结构和指令
Spectrum analysis of ADC sampling sequence based on stm32
Hcip day 12 (BGP black hole, anti ring, configuration)
Realize reverse proxy client IP transparent transmission
Leetcode daily question 1189 The maximum number of "balloons" simple simulation questions~
Week 17 homework
Element positioning of Web Automation
随机推荐
[speech processing] speech signal denoising and denoising based on MATLAB low-pass filter [including Matlab source code 1709]
Debian 10 installation configuration
一文搞定class的微观结构和指令
媒体查询:引入资源
Nacos installation and service registration
(4)UART應用設計及仿真驗證2 —— TX模塊設計(無狀態機)
派对的最大快乐值
Krypton Factor-紫书第七章暴力求解
Southeast Asia e-commerce guide, how do sellers layout the Southeast Asia market?
LeetCode102. Sequence traversal of binary tree (output by layer and unified output)
3:第一章:认识JVM规范2:JVM规范,简介;
Un article traite de la microstructure et des instructions de la classe
YML configuration, binding and injection, verification, unit of bean
Marginal probability and conditional probability
Douban scoring applet Part-2
二叉树递归套路总结
Nacos 的安装与服务的注册
CorelDRAW plug-in -- GMS plug-in development -- new project -- macro recording -- VBA editing -- debugging skills -- CDR plug-in (2)
判断二叉树是否为完全二叉树
UART Application Design and Simulation Verification 2 - TX Module Design (Stateless machine)