另外,如果想讓已經開啟的網頁全屏,有以下兩種方法:
1.使用ActiveX
2.使用window.open模擬當前頁:
<SCRIPT language="JavaScript"> function toFull(){ if(window.name=="fullscreen")return; var a =window.open("","fullscreen","fullscreen=yes") a.location = window.location.href window.opener=null window.close() } </SCRIPT> <html> <body> <input type=button value="full" onclick=toFull()> </body> </html>
另外,如果想讓已經開啟的網頁全屏,有以下兩種方法:
1.使用ActiveX
2.使用window.open模擬當前頁:
<SCRIPT language="JavaScript"> function toFull(){ if(window.name=="fullscreen")return; var a =window.open("","fullscreen","fullscreen=yes") a.location = window.location.href window.opener=null window.close() } </SCRIPT> <html> <body> <input type=button value="full" onclick=toFull()> </body> </html>