200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > html网页全屏代码 – CSS – 前端 css3 background-clip

html网页全屏代码 – CSS – 前端 css3 background-clip

时间:2023-10-17 03:40:24

相关推荐

html网页全屏代码 – CSS – 前端 css3 background-clip

<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.hrefwindow.opener=nullwindow.close() } </SCRIPT> <html> <body> <input type=button value=”full” onclick=toFull()> </body> </html>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。