HTML是超文本传输协议的缩写,是企业常用的静态页面技术之一。HTML网页全屏代码可以在浏览器的查看源代码功能里面查看。所以网页得有防止黑客攻击的功能,因为任何一个人可以查看到网页源代码。
<script><!–function fullwin(){window.open(“bigpage.html”,”bfs”,”fullscreen,scrollbars”)}//–></script><center><form><input type=”button” onClick=”fullwin()” value=”Open Full Screen Window”></form></center>
另外,如果想让已经打开的网页全屏,有以下两种方法:
1.使用ActiveX
<html><head><title>test</title><script language=”JavaScript”>function Fkey(){ var WsShell = new ActiveXObject(‘WScript.Shell’) WsShell.SendKeys(‘{F11}’);}</script></head><body><a href=”javascript:Fkey()”>to full</a></body></html>
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>