| 首页 | 下载中心 | 图片中心 | 
您现在的位置: 海华网 >> 编程日志 >> JS相关 >> 文章正文 用户登录 新用户注册
浏览器居中定位、禁用右键、复制、打印、另存为的代码         
浏览器居中定位、禁用右键、复制、打印、另存为的代码
作者:长春海华  文章来源:本站原创  点击数:  更新时间:2007-3-13
    

<!--禁止“另存为”代码-->
<noscript><iframe src=*.html></iframe></noscript>
<!--禁止“另存为”代码完毕-->

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文档信息查看</title>

<!--浏览器居中定位-->
<script language="JavaScript">window.moveTo(screen.width/2-400,screen.height/2-300);window.resizeTo(800, 600);</script>
<!--浏览器居中定位完毕-->

<!--禁用打印的style-->
<style media="print" type="text/css">  
.noprint{visibility:hidden}  
</style>
<!--禁用打印完毕-->
</head>

<!--禁用右键等-->
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"  oncontextmenu='return false' ondragstart='return false' onselectstart ='return false' onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforecopy='return false' onmouseup='document.selection.empty()'>
<!--禁用右键等完毕-->

<p class="noprint">
禁止打印的内容
</p>

</body>
<html>

文章录入:Haihua    责任编辑:Haihua 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    专 题 栏 目
    最 新 热 门
    最 新 推 荐
    相 关 文 章
    没有相关文章
        网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)