网站设计如果想让打开的网页全屏,有以下两种方法:
1.使用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>
2.使用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>
武汉网站建设领导品牌!武汉网站建设首选珞珈学子网络科技,精英技术团队,技术咨询电话:027-68772750 13618602336
上一篇:网站制作栏目和文章页面布局与广告建议
下一篇:建网站需要什么