父窗口JS:
<script language="javascript" type="text/javascript">
function openwin(){
var width=Math.round((window.screen.width-600)/2);
var height = Math.round((window.screen.height - 300) / 2);
var returnValue = window.showModalDialog("test.aspx', window, 'dialogWidth:600px;dialogHeight:300px, top=' + height + ',left=' + width + ',toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')
if (returnValue == 'ok')
window.top.location.reload();
}
</script>
test.aspx中<head>与</head>之间加上:
<base target="_self">
test.aspx.cs中:
Response.Write("<script language='javascript' type='text/javascript'>
window.returnValue = 'ok';window.close();
</script>");
相关推荐
实战指南:用Python实现ONVIF WS-Discovery设备发现(附完整代码)
本文提供了一份详细的实战指南,介绍如何使用Python实现基于ONVIF标准的WS-Discovery设备发现协议。文章深入解析了协议原理、网络通信模型,并提供了完整的代码实现,帮助开发者快速构建智能安防和物联网应用中的设备自动发现工具,有效提升网络设备集成与管理的效率。
关闭子窗口,刷新父窗口
很多时候,比如用户登录,要新弹出一个登录窗口。登录成功后,要关闭登录窗口,并且刷新主页面
QML 地图修改插件源码(三),Map在Plugin中设置加载地图类型
常用的地图种类分为交通图,地形图,卫星图等等,在QML的Map(以OSM地图为例)中提供activeMapType属性用于读取当前显示的地图类型(注意:该属性为只读属性,不能用于赋值),QML中地图的加载寻找根据瓦片的文件名进行查找,例如名为"osm_100-l-5-2-2-3.png"的瓦片,其中5代表了该地图的类型
ThinkCMF5的弹框子页面操作关闭及父页面刷新
function getPaike(id){ openIframeLayer("{:url('classroom/addpaike')}?id=" + id , "", { area: ['880px', '600px'], btn: ['确定', '取消'], }) } ...
Unity分包下载实战:AssetBundle+CDN+热更新全链路指南
分包下载是移动应用资源管理的核心技术,本质是将大体积安装包拆解为按需加载的独立资源单元,以解决用户安装意愿低、首屏启动慢、热更新不可控等关键问题。其底层依赖资源打包机制(如Unity AssetBundle)、全球分发网络(CDN)与安全热更新策略三者协同。AssetBundle提供资源隔离与依赖管理能力,CDN保障低延迟高可用下载,而热更新策略则决定版本控制、灰度发布与异常恢复的工程鲁棒性。该方案广泛应用于中重度游戏、大型工具类App及需要频繁内容迭代的商业项目,直接提升次日留存、过审成功率与用户在线时长
Python自动化生成HyperMesh Tcl命令流:从几何建模到有限元分析
本文详细介绍了如何利用Python自动化生成HyperMesh的Tcl命令流,实现从几何建模到有限元分析的全流程二次开发。通过封装常用操作函数,工程师可以高效完成参数化建模、自动网格划分及求解器文件输出,显著提升CAE前处理效率与标准化水平。
tkinter创建真正的嵌套子窗口
tkinter和win32gui实现真正意义上的嵌套子窗口
GPT-5.5 是真好用!SCI论文润色与学术写作能力上全面提升,全流程指令已整理好!
输出规范:先输出完整的摘要正文,不添加额外说明,以Markdown表格形式提供中文自检说明,表格包含两列,列标题为“检查项”和“说明”,逐项说明是否已覆盖背景、研究问题、方法、结果及贡献,并简要评价摘要结构与表达是否符合要求,除上述内容外不输出其他信息。:你是一位(学术写作专家/期刊审稿人/论文评审专家),精通学术写作规范、逻辑结构、语法准确性及学术表达方式,你的任务是帮助提升论文的质量,包括语言润色、语法检查、逻辑优化和降低重复率。语言需简洁、正式、具有概括性,不展开具体论述,仅提供结构与要点说明。
python tkinter 关闭窗口_如何关闭Tkinter窗口?
您应该destroy()用来关闭tkinter窗口。from Tkinter import *root = Tk()Button(root, text="Quit", command=root.destroy).pack()root.mainloop()说明:root.quit()上面的行只是绕过了root.mainloop()ie root.mainloop(),如果quit()执行了命令,ie...
基于STM32L4XX、HAL库的MCP4561数字电位器驱动程序设计
/ HAL库需要左移一位。* @param address: 设备地址(0x2C-0x2F)* @param hmcp: MCP4561句柄。* @param hmcp: MCP4561句柄。* @param hmcp: MCP4561句柄。* @param hmcp: MCP4561句柄。* @param hmcp: MCP4561句柄。* @param hmcp: MCP4561句柄。* @param hmcp: MCP4561句柄。* @param hi2c: I2C句柄。
谷歌A2A协议入门指南:附简易Python代码示例
继"关税"之后,当下最热门的词汇当属AI智能体——这种基于人工智能的软件能够执行复杂任务、实现工作流自动化并提升生产效率。但迄今为止,大多数智能体都处于各自为政的状态,难以顺畅协作。就像团队执行重大项目时,成员之间却无法交流!对于技术人员而言,一个可能遇到的典型场景是:假设你需要协调四个不同的AI服务——处理用户查询的Gemini智能体、在向量数据库进行搜索的AI应用、基于Claude的摘要生成器,以及运行专业领域逻辑的Python智能体。
python tkinter 窗口关闭_如何处理Tkinter中的窗口关闭事件?
马特展示了关闭按钮的一个经典修改。另一种方法是让“关闭”按钮最小化窗口。通过使用iconify方法可以复制此行为成为protocol方法的第二个参数。下面是一个在Windows7上测试的工作示例:# Python 3import tkinterimport tkinter.scrolledtext as scrolledtextclass GUI(object):def __init__(self...
096、PCIE环回模式(Loopback):调试时自己和自己对话的利器
摘要: PCIE环回模式是调试利器,通过让芯片内部数据自环来定位问题层级。文章详解三种环回模式:物理层环回验证基础收发,数据链路层环回测试DLLP机制,事务层环回验证端到端协议。分享了实战中的典型问题(时钟异常、状态机卡死、计数器失真)和"从下往上"的调试流程,强调要区分调试与生产功能,建议早期验证环回模式。通过具体代码示例和调试案例,说明合理使用环回模式能显著提升排查效率,是PCIE调试必备技能。(149字)
layui 关闭弹窗,刷新父窗体页面
关闭一个弹窗 当你想关闭一个弹窗时 var index = layer.open(); var index = layer.alert(); var index = layer.load(); var index = layer.tips(); 每一个弹窗都会产生一个index,我们可以根据index,关闭指定窗口 layer.close(layer.inde...
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
IDEA的使用指南
IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.
模式窗口showModalDialog的用法总结
最近几天一直在处理模式窗口的问题,索性写了这篇总结,以供参考:1。打开窗口:var handle = window.showModalDialog(url, objects, feathers);其中:objects可以为参数(包括数组),也可以是对象。通常的用法 objects = {window} ,把父窗体的对象共享给子窗体。2。关闭子窗口:window.close();3。
LinePhone3.2.7(android端最新版本) sip客户端
SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/
提交模式窗口后,刷新父窗口数据
有些时间,按需求设计,一个窗口中,点击按扭,弹出模式窗口,在模式窗口中,添加完数据后(提交),关闭模式窗口,并且刷新父窗口,而恰恰模式窗口并不支持window.opener,所以无法获得父窗口,也就是说无法在关闭模式窗口后,来得到父窗口,但是可以借助showModealDialog的返回值来判断是否刷新,当调用showModealDialog时,父窗口代码会停在这一行,当弹出的模式窗口关
android 蓝牙通讯demo
android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。
iframe及弹出窗口总结
1。打开窗口:Code:var handle = window.showModalDialog(url, objects, feathers);其中:objects可以为参数(包括数组),也可以是对象。通常的用法 objects = {window} ,把父窗体的对象共享给子窗体。2。关闭子窗口:Code:window.close();3。从子窗体传参数给父窗体:Cod
有模式弹出子窗体,关闭时刷新父窗体
主窗体alert(aaa);function show(){ window.showModalDialog(test.html,window,dialogHeight:400px;dialogWidth:54f0px;center:yes;help:no;resizable:no;status:no;scroll:no;); window.location.reload();}
子窗體關閉后,刷新父窗體!
window.dialogArguments.dialogSubmit(); 模式窗口提交 window.opener.location.href=window.opener.location.href;強制刷新 window.opener.location.reload()刷新父窗體,會彈出對話框提示是否重試!
提交模式窗口后,刷新父窗口数据+获取frameset中各模块中数据
转自:http://www.iteye.com/topic/724864 一、提交模式窗口后,刷新父窗口数据 有些时间,按需求设计,一个窗口中,点击按扭,弹出模式窗口,在模式窗口中,添加完数据后(提交),关闭模式窗口,并且刷新父窗口,而恰恰模式窗口并不支持window.opener,所以无法获得父窗口,也就是说无法在关闭模式窗口后,来得到父窗口,但是可以借助show...
java刷新界面函数_window.showModalDialog刷新父窗口和本窗口的方法及注意
window.showModalDialog刷新父窗口和本窗口的方法及注意:一.刷新父窗口的方法:A.使用window.returnValue给父窗口传值,然后根据值判断是否刷新。在window.showModalDialog窗口页面中用window.returnValue方式设置返回值;比如:window.returnValue='refresh';B。在写window.showModalDia...
删除提示、弹出窗口、本窗口关闭,父窗口刷新
一、删除提示 <a href='javascript:if(confirm("确定要删除吗?")){window.location="routerInfo.do?method=del&&id=${pro.id }";}'>删除</a> 二、使用window.open()打开页面,即弹出窗口 <p align=c...
js模式窗口
有一个地方需要模式窗口 先上window.showModalDialog使用手册 基本介绍:showModalDialog() (IE 4+ 支持)showModelessDialog() (IE 5+ 支持)window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框。window.showModelessDialog()方法用来创建...
模式窗口showModalDialog的用法总结(收藏)
1.打开窗口:var handle = window.showModalDialog(url, objects, feathers);其中:objects可以为参数(包括数组),也可以是对象。通常的用法 objects = {window} ,把父窗体的对象共享给子窗体。 2.关闭子窗口:window.close();3.从子窗体传参数给父窗体:window.returnVal = string;
1114



被折叠的 条评论
为什么被折叠?



