Javascript彈出唯一視窗

來源:互聯網
上載者:User

Javascript快顯視窗:

oNewWindow
= window
.open(
[
sURL
]
[
,
sName
]
[
,
sFeatures
]
[
,
bReplace
]
)


[
sURL
]
= 快顯視窗顯示內容的路徑

 

[
sName
]
  =
視窗名稱

常用的參數為:  _blank 建立新的視窗,該視窗沒有名稱

                     ,_slef  在當前視窗下顯示

 

[
sFeatures
]  = 
表單具體參數

常用的參數為:

fullscreen = { yes | no | 1 | 0 }  是否全屏,如果設定了高和寬,全屏失效

resizable  = { yes | no | 1 | 0 }  是否可調整大小(IE中可用)

scrollbars = { yes | no | 1 | 0 }  是否需要捲軸

toolbar     = { yes | no | 1 | 0 }  是否顯示工具列

width      
=  number                  表單寬度

height      =  number                  表單高度

 

快顯視窗的方式,可根據_blank和_slef而定。怎樣才能彈出唯一視窗呢,也是根據
[
sName
]
而定。_slef是在當前表單顯示所以不會建立新的表單,我們看看_blank參數,建立新表單但是沒有名稱。關鍵就在與彈出的新表單是否有名字。只要給表單定個名稱就可以了。代碼具體如下:

 

var newWindow = window.open("url"<br /> ,"newWindow"<br /> ,"scrollbars=yes,fullscreen = no,width=600,height=400,resizable = yes,toolbar = no");</p><p> newWindow.focus();

[
sName
]
  =
newWindow,也就是給表單起的名字。試試是否可以了?

 



 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.