分享

js——网页全屏显示

 moyqsky 2010-11-13

js——网页全屏显示

页面与JavaScript 2010-04-15 11:21:01 阅读227 评论0   字号: 订阅

程序代码如下:

这段程序放在<body>与</body>之间 <script>
<!--
function windowopen(){
var target="http://zhoucaiqi."
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>
 
 程序讲解:
   


function windowopen()
定义一个函数。{ var target="http://zhoucaiqi." 
设置一个字符串。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()函数。[url=http://www./lsbwahaha/category/39058.html][/url]

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多