|
修改window.open中的屬性值就可輕易完成各種窗口的定制。
window.open()中的各項內(nèi)容如下: 1:鏈按地址 2:窗口名稱 3:toolbar工具欄 4:location地址欄 5:directories鏈接欄 6:status狀態(tài)欄 7:menubar菜單欄 8:scrollbars滾動條 9:resizable窗口大小是否可調(diào) 10:width,height窗口的寬度和高度 11:left,top窗口的起始位置 12:fullscreen打開無邊的全屏窗口 13:channelmode打開頻道式的窗口 注意:1:最后二項如果為1(YES),則3-11的各項參數(shù)無效,如果要簡化代碼,可以直接刪除。 2:窗口名稱不能相同 0=NO 1=YES 默認(rèn)值為0,如果參數(shù)=0,可以直接刪除,以簡化代碼。--->
<!----------------- 代碼一(文字),修改參數(shù)可改變窗口樣式 -----------------> <a href=# onClick="window.open(‘wytx.htm‘, ‘a(chǎn)aa‘, ‘toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=yes,width=490,height=320,left=0,top=0,fullscreen=0,channelmode=0‘,‘-blank‘)";>返回目錄</a>
<!----------------- 代碼二(按鈕),修改參數(shù)可改變窗口樣式 -----------------> <button onClick="window.open(‘../index.asp‘, ‘bbb‘, ‘toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=yes,width=490,height=320,left=0,top=0,fullscreen=0,channelmode=0‘,‘-blank‘)" class="css5" >返回首頁</button>
<!----------------- 代碼三(圖片),修改參數(shù)可改變窗口樣式 -----------------> <img src="/198.gif" height=24 width=68 alt=open style="cursor:hand" onClick="window.open(‘../index.asp‘, ‘ccc‘, ‘toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=yes,width=490,height=320,left=0,top=0,fullscreen=0,channelmode=0‘,‘-blank‘)";>
|