IE裏Window的Method列表

attachEvent(sEvent,pFunction)
//綁定一個函數到某個事件,事件觸發時隨機執行其中一個被綁定的函數
blur()
//令窗口喪失焦點

clearInterval(iIntervalID)
//清除指定定時器的關聯函數
clearTimeout(iTimeoutID)
//清除指定延時器的關聯函數
close()
//關閉窗口,如果窗口不是用腳本打開的,會彈出確認對話框。
confirm([sMessage])
//彈出“確定/取消”對話框
createPopup([vArgs])
//創建一個隱藏的彈出式窗口,vArgs是未來考慮提供的參數,返回窗口句柄
detachEvent(sEvent,pFunction)
//取消一個事件的某個綁定函數
execScript(sExpression, sLanguage)
//用指定的語言執行代碼
focus()
//激活窗口
moveBy(iX,iY)
//用相對方式移動窗口
moveTo(iLeft,iTop)
//用絕對方式移動窗口
navigate(sURL)
//轉到指定的連接
open( [sURL] [, sName] [, sFeatures] [, bReplace])
//打開新窗口,並返回窗口句柄
//sName=(*_blank:打開一個新的未命名窗口;_parent:在父窗口中打開;_search:同時打開搜索窗口;_self:替換本窗口; _top:在頂級窗口裏打開;*)
//sFeatures=(*channelmode = { yes | no | 1 | 0 };directories = { yes | no | 1 | 0 };fullscreen = { yes | no | 1 | 0 };height = number;left = number;location = { yes | no | 1 | 0 };menubar = { yes | no | 1 | 0 };resizable = { yes | no | 1 | 0 };scrollbars = { yes | no | 1 | 0 };status = { yes | no | 1 | 0 };titlebar = { yes | no | 1 | 0 };toolbar = { yes | no | 1 | 0 };top = number;width = number;*)
print()
//打印當前窗口文檔內容
prompt( [sMessage] [, sDefaultValue])
//彈出輸入對話框
resizeBy(iX, iY)
//以相對方式改變窗口大小
resizeTo(iWidth, iHeight)
//以絕對方式改變窗口大小
scroll(iX,iY)
滾動窗口,與scrollTo一樣的效果,出於兼容性的考慮保留下來的方法
scrollBy(iX, iY)
//用相對方式滾動窗口
scrollTo(iX, iY)
//用絕對方式滾動窗口
setActive()
//激活目標而不將視線轉向目標
setInterval(vCode, iMilliSeconds [, sLanguage])
//定時執行一段代碼
setTimeout(vCode, iMilliSeconds, sLanguage)
//延時執行一段代碼
showHelp(sURL [, vContextID])
//打開一個幫助文件,sURL爲幫助文檔地址,vContextID爲幫助索引號
showModalDialog(sURL [, vArguments] [, sFeatures])
//打開一個模式對話框
//vArguments=需要向新開模式對話框傳遞的參數
//sFeatures=(*dialogHeight:sHeight;dialogLeft:sXPos;dialogTop:sYPos;dialogWidth:sWidth;center:{ yes | no | 1 | 0 | on | off };dialogHide:{ yes | no | 1 | 0 | on | off };edge:{ sunken | raised };help:{ yes | no | 1 | 0 | on | off };resizable:{ yes | no | 1 | 0 | on | off };scroll:{ yes | no | 1 | 0 | on | off };status:{ yes | no | 1 | 0 | on | off };unadorned:{ yes | no | 1 | 0 | on | off };*)
showModelessDialog(sURL [, vArguments] [, sFeatures])
//打開一個非模式對話框
//vArgument=需要向新開模式對話框傳遞的參數
//sFeatures=(*dialogHeight:sHeight;dialogLeft:sXPos;dialogTop:sYPos;dialogWidth:sWidth;center:{ yes | no | 1 | 0 | on | off };dialogHide:{ yes | no | 1 | 0 | on | off };edge:{ sunken | raised };help:{ yes | no | 1 | 0 | on | off };resizable:{ yes | no | 1 | 0 | on | off };scroll:{ yes | no | 1 | 0 | on | off };status:{ yes | no | 1 | 0 | on | off };unadorned:{ yes | no | 1 | 0 | on | off };*)
9:execCommand的完全參考(中文版)
document.execCommand(sCommand[,交互方式, 動態參數])
2D-Position;document.execCommand("2D-Position","false","true");使絕對定位的對象可直接拖動;ie5.5
AbsolutePosition;document.execCommand("AbsolutePosition","false","true");使對象定位變成絕對定位;ie5.5
BackColor;document.execCommand("BackColor","false",sColor);設置背景顏色;ie4.0
BlockDirLTR;none;使塊級元素排版方式爲從左到右?;不支持
BlockDirRTL;none;使塊級元素排版方式爲從右到左?;不支持 Bold;document.execCommand("Bold","false",null);使選中區域的文字加粗;ie4.0
BrowseMode;none;設置瀏覽器模式?;不支持 Copy;
document.execCommand("Copy","false",null);複製選中的文字到剪貼板;ie4.0 CreateBookmark;document.execCommand("CreateBookmark","false",sAnchorName);設置指定錨點爲書籤;ie4.0
CreateLink;document.execCommand("CreateLink","false",sLinkURL);將選中文本變成超連接,若第二個參數爲true,會出現參數設置對話框;ie4.0
Cut;document.execCommand("Cut","false",null);剪貼選中的文字到剪貼板;ie4.0
Delete;document.execCommand("Delete","false",null);刪除選中的文字;ie4.0
DirLTR;none;排版方式爲從左到右?;不支持 DirRTL;none;排版方式爲從右到左?;不支持
EditMode;none;設置編輯模式?;不支持
FontName;document.execCommand("FontName","false",sFontName);改變選中區域的字體;ie4.0
FontSize;document.execCommand("FontSize","false",sSize|iSize);改變選中區域的字體大小;ie4.0
ForeColor;document.execCommand("ForeColor","false",sColor);設置前景顏色;ie4.0
FormatBlock;document.execCommand("FormatBlock","false",sTagName);設置當前塊的標籤名;ie4.0

窗口一共有四個參數:
window.open(str1,str2,str3,str4)
str1:要打開的地址:
str2:窗口的名字,可以自定義和取下面的值:
_blank,_parent,_self,_top,_search,[IE5+支持],_media[ie6]。
str3:爲屬性值:
str4:是否新開窗口:取:
true或false
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章