本文转载:http://www.cnblogs.com/sunnycoder/archive/2010/05/05/1728047.html 基本知识 l showModalDialog() (IE 4+ 支持) l showModelessDialog() (IE 5+ 支持) l window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框。 使用方法 var returnValue = window.showModalDialog(sURL[,vArguments][,sFeatures]); var returnValue = window.showModelessDialog 例如: a.html window.showModalDialog("b.html"); alert(window.returnValue.Name); b.html var p = { Name: ; //传递进去的参数 arg.win = window; //把当前窗口的引用当参数传进去 arg.str = "argument"; //要传进去的其他参数 window.showModalDialog
1.定义 window.showModalDialog()用来创建模态对话框 语法为:vReturnValue = window.showModalDialog(sURL [, vArguments] yes resizable 是否可被改变大小 默认no status 是否显示状态栏 Modal默认no,Modeless默认yes scroll 是否显示滚动条 默认为yes 注意: window.showModalDialog 区别: window.showModalDialog()和window.open()都可以打开页面,两者之间有什么区别? ,建议使用showModalDialog()方法 2.用法 现在我们一起来看一下showModalDialog具体该如何使用 我们新建两个页面,放在同一个文件夹下面,名称分别为parent.html和child.html "UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>父页面——showModalDialog
7.showModalDialog 例 1.7.1(showModalDialogOIEFF.html) <! -- function choice() { /* 马克-to-win:showModalDialog will get back window.returnValue from second.html , 要注意两个window传递参数的方法*/ var v = showModalDialog("secondoR.html"); document.getElementById("cla
在是用ShowModalDialog 弹出子窗体中在标签后,加入<base target="_self" />后,对于子窗体: 1、POSTBACK后不会打开新窗体。 —————————————————– 附:showModalDialog()、showModelessDialog()方法使用详解 Javascript有许多内建的方法来产生对话框,如:window.alert 如: showModalDialog() (IE 4+ 支持) showModelessDialog() (IE 5+ 支持) window.showModalDialog()方法用来创建一个显示 ("test2.htm",mxh1) // 向对话框传递window对象 window.showModalDialog("test3.htm",mxh2) </script> test2.htm 例如: test4.htm =================== <script> var a = window.showModalDialog("test5.htm") for(i=0;i<
但是selenium无法定位到这类窗口,百度说是目前selenium不支持处理模态窗口。
本文翻译自: http://mksben.l0.cm/2016/09/safari-uxss-showModalDialog.html (英文版) http://masatokinugawa.l0.cm CVE-2016-4758: Masato Kinugawa of Cure53 漏洞条件供参考,移动版Safari不受漏洞影响,因为没有showModalDialog方法。 漏洞详情 现在使用showModalDialog方法。下述页面只在modal dialog(模式窗口)中打开。 https://l0.cm/safari_uxss_showModalDialog/example.html <script> function go(){ showModalDialog("https 下面是最终PoC: https://l0.cm/safari_uxss_showModalDialog/ <!
{ //System.Web.UI.ScriptManager.RegisterStartupScript(ps, ps.GetType(), strName, "window.showModalDialog true); System.Web.UI.ScriptManager.RegisterStartupScript(ps, ps.GetType(), strName, "window.showModalDialog { //System.Web.UI.ScriptManager.RegisterStartupScript(ps, ps.GetType(), strName, "window.showModalDialog true); System.Web.UI.ScriptManager.RegisterStartupScript(ps, ps.GetType(), strName, "window.showModalDialog true); System.Web.UI.ScriptManager.RegisterStartupScript(ps, ps.GetType(), strName, "window.showModalDialog
html伪代码如下: <a href=”javascript:showModalDialog();”> js代码: function showModalDialog(){ var modalDialogStyle =”dialogWidth=1000px;dialogHeight=600px;scroll:no;status:no”; return window.showModalDialog(“111.html
想用window.showModalDialog的方法: window.showModalDialog(ActionUrl + '?
弹出模态窗体的语句: var testSend = window.showModalDialog('modal.htm','','dialogHeight:150px;dialogWidth:500px var person = { "id":"001", "name":"yangyang" }; var testSend = window.showModalDialog
6.Response.Write(“<script>window.showModalDialog(‘Default2.aspx’)</script>”); 7.Response.Write(“<script >window.showModelessDialog(‘Default2.aspx’)</script>”); (一)、showModalDialog和showModelessDialog有什么不同 showModalDialog:被打开后就会始终保持输入焦点。除非对话框被关闭,否则用户无法切换到主窗口。类似alert的运行效果。 :P) (二)、怎样才让在showModalDialog和showModelessDialog的超连接不弹出新窗口? 在被打开的网页里加上<base target=”_self”>就可以了。
在父窗体中弹出一个模式窗体: var strUrl = ‘test.php’; window.showModalDialog(strUrl, window, “dialogWidth:800px; dialogHeight
,我们也可以用对话框窗口来实现,这就要用到showModalDialog()或是showModelessDialog()
<html>
<SCRIPT LANGUAGE="JavaScript --<br /><br /> <em>showModalDialog</em>('http://www.fwcn.com','example04','dialogWidth:400px;dialogHeight:300px www.fwcn.com</b><br /><br /> </body><br /><br /> </html><br /><br />
以上我只是尝试做了一种类型而已,这里面更多的惊奇还等着你去发现,至于<em>showModalDialog</em> ()与showModelessDialog()的区别,在于<em>showModalDialog</em>()打开的窗口(简称模式窗口),置在父窗口上,必须关闭才能访问父窗口(建议尽量少用,以免招人反感);showModelessDialog
showModalDialog()以及showModelessDialog() 1.用showModalDialog() <html> <SCRIPT LANGUAGE="javascript -- <em>showModalDialog</em>('http://www.okajax.com','example04','dialogWidth:400px;dialogHeight:300px;dialogLeft yes;resizable:yes;status:yes') //--> </SCRIPT> <b>http://www.okajax.com/</b> </body> </html> 至于<em>showModalDialog</em> ()与showModelessDialog()的区别,在于<em>showModalDialog</em>()打开的窗口(简称模式窗口),置在父窗口上,必须关闭才能访问父窗口(建议尽量少用,以免招人反感);showModelessDialog
6 split就是将一字符串以特定的字符切割成多个字符串,并以一维数组的形式储存 我项目中的样例: function SelectCompany() { var str=window.showModalDialog
6.Response.Write(“<script>window.showModalDialog(‘Default2.aspx’)</script>”); 7.Response.Write(“<script >window.showModelessDialog(‘Default2.aspx’)</script>”); (一)、showModalDialog和showModelessDialog有什么不同 showModalDialog:被打开后就会始终保持输入焦点。除非对话框被关闭,否则用户无法切换到主窗口。类似alert的运行效果。 :P) (二)、怎样才让在showModalDialog和showModelessDialog的超连接不弹出新窗口? 在被打开的网页里加上<base target=”_self”>就可以了。
并无其他含义:) 弹窗的属性:popupModel 有3个值,分别为: window:弹窗(window.open) link:链接方式 showdialog:模态对话框(window.showModalDialog
require_once|shell_exec|phpinfo|system|passthru|preg_\w+|execute|echo|print|print_r|var_dump|(fp)open|alert|showmodaldialog require_once|shell_exec|phpinfo|system|passthru|preg_\w+|execute|echo|print|print_r|var_dump|(fp)open|alert|showmodaldialog
dialog box in web based application, I have provided some examples to popping up a dialog box using showModalDialog Here is the code: Parent.aspx <script> function AddBook() { var returnVal = window.showModalDialog
好处是开发方便 实现方式2 采用window.showModalDialog()方法弹出窗口选择后回调结果赋值代码如下,后台在最终保存到数据库前可以通过一个hashtable进行Code,Name替换 主窗体 function getCurrCode() { var returnVal = window.showModalDialog("CodeList.aspx", null, "dialogHeight