网站设计打开全屏网页的两种方法
网站设计打开全屏网页的两种方法
发布时间:2015-05-12 来源:查字典编辑
摘要:网站设计如果想让打开的网页全屏,有以下两种方法:1.使用window.open模拟当前页:functiontoFull(){if(windo...

 网站设计如果想让打开的网页全屏,有以下两种方法:

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>

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新交互设计教程学习
热门交互设计教程学习
网页设计子分类