2007年4月5日 星期四

開出最大化視窗的方法

開出最大化視窗的方法,還是要用到javascript,不過並沒有很複雜,剛剛詢問Google大神就找到了。

在head標籤之間插入

<script language="JavaScript">
window.onload = maxWindow;
function maxWindow(){
window.moveTo(0,0);
if (document.all){
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById){
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
</script>

這樣就可以了~

沒有留言: