色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

WEB頁子窗口(showModalDialog和showModelessDialog)使用說明

使用環境:
  showModalDialog  IE4以上版本
  showModelessDialog  IE5以上
區別:
  showModalDialog  被打開后就會始終保持輸入焦點。無法操作主窗口,除非關閉對話框。
  showModelessDialog  被打開后,用戶可以隨機切換輸入焦點。只是主窗口被對話框擋住。
使用方法:
  vReturnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
  vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])
參數說明:
  sURL   必選參數,類型:字符串。用來指定對話框要顯示的文檔的URL。
  vArguments  可選參數,類型:變體。用來向對話框傳遞參數。傳遞的參數類型不限,包括數組等。對話框通過window.dialogArguments來取得傳遞進來的參數。
  sURLsFeatures  可選參數,類型:字符串。用來描述對話框的外觀等信息,可以使用以下的一個或幾個,用分號“;”隔開。
   1.dialogHeight 對話框高度,不小于100px,IE4中dialogHeight和dialogWidth 默認的單位是em,而IE5中是px
   2. dialogWidth: 對話框寬度。
   3. dialogLeft: 離屏幕左的距離。
   4. dialogTop: 離屏幕上的距離。
   5. center: { yes | no | 1 | 0 } : 是否居中,默認yes,但仍可以指定高度和寬度。
   6. help: {yes | no | 1 | 0 }: 是否顯示幫助按鈕,默認yes。
   7. resizable: {yes | no | 1 | 0 } [IE5+]: 是否可被改變大小。默認no。
   8. status:{yes | no | 1 | 0 } [IE5+]:是否顯示狀態欄。默認為yes[ Modeless]或no[Modal]。
   9. scroll:{ yes | no | 1 | 0 | on | off }:是否顯示滾動條。默認為yes。
   10. dialogHide:{ yes | no | 1 | 0 | on | off }:在打印或者打印預覽時對話框是否隱藏。默認為no。
   11. edge:{ sunken | raised }:指明對話框的邊框樣式。默認為raised。
   12. unadorned:{ yes | no | 1 | 0 | on | off }:默認為no。
例子:
f.html
復制代碼 代碼如下:
<html>
<head>
<title>主窗口</title>
<script type="text/Javascript">
<!--
var child;
function openDialogBox()
{
child = window.showModalDialog('c.html',document.all["txt"],"dialogWidth=500px;dialogHeight=200px;");
}
//-->
</script>
</head>
<body>
<input name="txt" type="text" disabled="disabled" />
<input name="btn" type="button" value="打開對話框" onClick="openDialogBox();" />
</body>
</html>

c.html
復制代碼 代碼如下:
<html>
<head>
<title>對話框</title>
<script type="text/Javascript">
<!--
function set()
{
window.dialogArguments.value=document.all["txt"].value
}
//-->
</script>
</head>
<body>
<input name="txt" type="text"/>
<input name="btn" type="button" value="設置" onClick="set();" />
</body>
</html>

JavaScript技術WEB頁子窗口(showModalDialog和showModelessDialog)使用說明,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 鹰潭市| 驻马店市| 简阳市| 杭锦后旗| 枣阳市| 陵川县| 商城县| 吴旗县| 蓬安县| 尚志市| 天峻县| 乡宁县| 汉源县| 武功县| 尤溪县| 乌兰察布市| 舒兰市| 彭州市| 兴安县| 绥江县| 兴安县| 江孜县| 资兴市| 甘孜县| 浏阳市| 眉山市| 兰溪市| 澎湖县| 封开县| 丹阳市| 牟定县| 襄城县| 德令哈市| 玉树县| 佛山市| 广宗县| 开原市| 陆河县| 黔西县| 洪江市| 日喀则市|