把这段代码加到网页中
页面全屏显示[ALT+F4关闭][共1步][新弹出窗口并以全屏幕方式显示]
====1、将以下代码加入HTML的<body></body>之间:
<form>
<div align="center">
<input type="BUTTON" name="FullScreen" value="全屏显示" onClick="window.open(document.location, 'big', 'fullscreen=yes')">
</div>
</form>
2
源程序讲解:
function windowopen() 定义一个函数。
{ var target="http://www.hongen.com" 设置一个字符串。
newwindow=window.open("","","
scrollbars") 打开一个新窗口。
if (document.all)
{ newwindow.moveTo(0,0) 新窗口从(0,0)位置开始显示。
newwindow.resizeTo
(screen.width,screen.height) } 新窗口的尺寸是整个屏幕的宽,整个屏幕的高。
newwindow.location=target 显示target指定的链接地址。
<input type="button" onClick="windowopen()" value="全屏显示" name="button"> 插入一个按钮,击它的时候调用windowopen()函数。
这段程序放在<body>与</body>之间
<script>
<!--
function windowopen(){
var target="http://www.hongen.com"
newwindow=window.open("","","scrollbars")
if (document.all){
newwindow.moveTo(0,0)
newwindow.resizeTo(screen.width,screen.height)
}
newwindow.location=target
}
//-->
</script>
<form>
<input type="button" onClick="windowopen()" value="全屏显示" name="button">
</form> |