JS中showModalDialog 详细使用
来源:互联网 发布:网络机顶盒刷机工具 编辑:程序博客网 时间:2024/05/06 18:03
基本介绍:
使用方法:
参数说明:
----------------
1.
2.
3.
4.
5.
6.
7.
8.
9.
下面几个属性是用在HTA中的,在一般的网页中一般不使用。
10.
11.
12.
参数传递:
1.
-------------------------------
parent.htm
<script>
</script>
modal.htm
<script>
</script>
-------------------------------
2.可以通过window.returnValue向打开对话框的窗口返回信息,当然也可以是对象。例如:
------------------------------
parent.htm
<script>
</script>
modal.htm
<script>
</script>
常见技巧:
一、怎样才让在showModalDialog和showModelessDialog的超连接不弹出新窗口?
在被打开的网页里加上<basetarget="_self">就可以了。这句话一般是放在<head>之间的。
二、怎样才刷新showModalDialog和showModelessDialog里的内容?
在showModalDialog和showModelessDialog里是不能按F5刷新的,又不能弹出菜单。这个只能依靠
javascript了,以下是相关代码:
<body onkeydown="if(event.keyCode==116){reload.click()}">
<a id="reload" href="filename.htm"style="display:none">reload...</a>
将filename.htm替换成网页的名字然后将它放到你打开的网页里,按F5就可以刷新了,注意,这个要
配合<basetarget="_self">使用,不然你按下F5会弹出新窗口的。
三、如何用javascript关掉showModalDialog(或showModelessDialog)打开的窗口。
<input type="button" value="关闭"onclick="window.close()">
也要配合<basetarget="_self">,不然会打开一个新的IE窗口,然后再关掉的。
四、Math.random与showModalDialog。
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- JS中showModalDialog 详细使用
- FusionCharts API:数字格式
- 使用 Zeller 公式计算 DayOfWeek
- js使用正则表达式
- 农业银行网银证书的控件被阻止的解…
- resource is out of sync with t…
- JS中showModalDialog 详细使用
- Javascript 缺少标识符 字符串或数…
- validationEngine中文版 — jquery…
- js在IE8+兼容String没有trim方法
- 在模式窗口中防止弹出新页面
- 模式窗口参数详解
- js中给移除指定数组元素
- table拖动表格列宽度
- jsp设置页面无缓存