form show 和form.ShowModal的区别

form show 和form.ShowModal的区别

show 是以普通模式显示。非模态窗口,关闭时窗体并没有释放
showmadle 是以模态的模式显示,模态窗口, 即它显示后,别的窗口无法获得焦点。

 

procedure TFrmMain.btnModelClick(Sender: TObject);
begin
  FrmShow := TFrmGroundInfor.Create(Application);
  FrmShow.ShowModal; //以模态的模式显示,别的窗口无法获得焦点,您可以工作在本窗体中,必须人工关闭窗口
  FrmShow.Free;
end;

 

procedure TFrmMain.btnShowClick(Sender: TObject);
begin
   FrmShow := TFrmGroundInfor.Create(Application);
   FrmShow.Show;//以普通模式显示,您可以继续作其他工作,一般地这种窗体用于显示,很少用于输入和编辑。
 end;

``` <%@ page language="java" import = "java.util.*" import ="javax.swing.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> <link rel="stylesheet" href="../style/head_page.css"> <link rel="stylesheet" href="../style/main_function.css"> </head> <body> <div> <input type="button" class = "setting" value = "设置" id = "setting" onclick = "set.show()"> <select name = "gender" class = "account"> <option>一<% /*session.setAttribute("name",1); Window.localStorage.setItem("test", 1); window.localStorage.getItem("name");*/ %></option > <% //查询数据库的账套 %> <option> 二 </option> <option>三</option> <option>保密</option> </select> <input type = "button" id = "exit" class = "exit" value = "退出"> </div> <div id="overlay" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background-color:rgba(0,0,0,0.5); z-index:99;"></div> <div class = "main_function"> <input type = "button" value = "查看凭证" onclick = javascript:jump() class = "certificate" > </div> <dialog id = "set" class = "all_set" style = "z-index : 100"> <input type = "button" class = "close" onclick = "set.close()" value = "返回"> <form action = "account_set.jsp"> <input type = "submit" id = "account_set" class = "set1" value = "账套设置>" ></form> <br> <form action = "information.jsp"> <input type = "submit" id = "self_information" class = "set2" value = "个人信息>" ></form> </dialog> <script> const overlay = document.getElementById('overlay'); // 遮罩层 const addAccountDialog = document.getElementById('set'); // 对话框 // 打开弹窗的同时显示遮罩 function showOverlayAndDialog() { overlay.style.display = 'block'; // 显示遮罩 addAccountDialog.showModal(); // 显示弹窗 } // 关闭弹窗的同时隐藏遮罩 function hideOverlayAndDialog() { overlay.style.display = 'none'; // 隐藏遮罩 addAccountDialog.close(); // 关闭弹窗 } // 绑定按钮事件 document.querySelector('.setting').addEventListener('click', showOverlayAndDialog); // 点击“返回”按钮关闭弹窗并隐藏遮罩 document.querySelector('#set input[value="返回"]').addEventListener('click', hideOverlayAndDialog); // 如果用户点击了遮罩区域,则自动关闭弹窗及遮罩 overlay.addEventListener('click', hideOverlayAndDialog); function : jump_certificate() { window.location.href="certificate.jsp"; } </script> </body> </html>```为什么遮罩没有生效、
最新发布
03-16
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值