欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

WEB頁(yè)子窗口(showModalDialog和showModelessDialog)使用說(shuō)明

 更新時(shí)間:2009年10月25日 10:59:00   作者:  
WEB頁(yè)子窗口(showModalDialog和showModelessDialog)使用說(shuō)明,大家可以看下。
使用環(huán)境:
  showModalDialog  IE4以上版本
  showModelessDialog  IE5以上
區(qū)別:
  showModalDialog  被打開(kāi)后就會(huì)始終保持輸入焦點(diǎn)。無(wú)法操作主窗口,除非關(guān)閉對(duì)話(huà)框。
  showModelessDialog  被打開(kāi)后,用戶(hù)可以隨機(jī)切換輸入焦點(diǎn)。只是主窗口被對(duì)話(huà)框擋住。
使用方法:
  vReturnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
  vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])
參數(shù)說(shuō)明:
  sURL   必選參數(shù),類(lèi)型:字符串。用來(lái)指定對(duì)話(huà)框要顯示的文檔的URL。
  vArguments  可選參數(shù),類(lèi)型:變體。用來(lái)向?qū)υ?huà)框傳遞參數(shù)。傳遞的參數(shù)類(lèi)型不限,包括數(shù)組等。對(duì)話(huà)框通過(guò)window.dialogArguments來(lái)取得傳遞進(jìn)來(lái)的參數(shù)。
  sURLsFeatures  可選參數(shù),類(lèi)型:字符串。用來(lái)描述對(duì)話(huà)框的外觀等信息,可以使用以下的一個(gè)或幾個(gè),用分號(hào)“;”隔開(kāi)。
   1.dialogHeight 對(duì)話(huà)框高度,不小于100px,IE4中dialogHeight和dialogWidth 默認(rèn)的單位是em,而IE5中是px
   2. dialogWidth: 對(duì)話(huà)框?qū)挾取?
   3. dialogLeft: 離屏幕左的距離。
   4. dialogTop: 離屏幕上的距離。
   5. center: { yes | no | 1 | 0 } : 是否居中,默認(rèn)yes,但仍可以指定高度和寬度。
   6. help: {yes | no | 1 | 0 }: 是否顯示幫助按鈕,默認(rèn)yes。
   7. resizable: {yes | no | 1 | 0 } [IE5+]: 是否可被改變大小。默認(rèn)no。
   8. status:{yes | no | 1 | 0 } [IE5+]:是否顯示狀態(tài)欄。默認(rèn)為yes[ Modeless]或no[Modal]。
   9. scroll:{ yes | no | 1 | 0 | on | off }:是否顯示滾動(dòng)條。默認(rèn)為yes。
   10. dialogHide:{ yes | no | 1 | 0 | on | off }:在打印或者打印預(yù)覽時(shí)對(duì)話(huà)框是否隱藏。默認(rèn)為no。
   11. edge:{ sunken | raised }:指明對(duì)話(huà)框的邊框樣式。默認(rèn)為raised。
   12. unadorned:{ yes | no | 1 | 0 | on | off }:默認(rèn)為no。
例子:
f.html
復(fù)制代碼 代碼如下:

<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="打開(kāi)對(duì)話(huà)框" onClick="openDialogBox();" />
</body>
</html>

c.html
復(fù)制代碼 代碼如下:

<html>
<head>
<title>對(duì)話(huà)框</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="設(shè)置" onClick="set();" />
</body>
</html>

相關(guān)文章

最新評(píng)論