var openToFullScreen = function(){ var myWin = window.open('http://bioankeyang.blogspot.tw/','','fullscreen=yes'); myWin.moveTo(0,0); myWin.resizeTo(screen.width, screen.height); };
上列的window.open方法,請參考W3C官網說明。
再來新增一顆按鈕,來做新開網頁視窗的動作:
你可以點按下列按鈕,看看執行結果: