常用javascript

  1. 后退加刷新
   window.location.replace(document.referrer);
  1. 禁止网页另存为
<noscript><iframe src=*.html></iframe></noscript>
  1. 放置被人frame
<SCRIPT type="text/javascript"> 
if (top.location != self.location)top.location=self.location; 
</SCRIPT>

4.关闭输入法

<input style="ime-mode:-Disabled"/>
  1. 在收藏夹中显示出图标
<link rel="Bookmark" href="favicon.ico">
  1. 防止复制
oncopy="return false;" oncut="return false;"

7.不准粘贴

onpaste="return false"

8.取消选取、防止复制

<body onselectstart="return false">

9.屏蔽鼠标右键

 oncontextmenu="window.event.returnvalue=false"
  1. 禁止打印
<style> 
@media print{ 
body{display:none} 
} 
</style> 

猜你喜欢

转载自blog.csdn.net/zhangningkid/article/details/73822823