javascript实用代码

 

1、彻底屏蔽鼠标右键,可用于Table
<code lang='html' width='auto' height='auto'><table οncοntextmenu='return false'></table></code>

2、取消选取、防止复制
<code lang='html' width='auto' height='auto'><body onselectstart="return false"/></code>

3、禁用复制、粘贴、剪切
<code lang='javascript' width='auto' height='auto'>οnpaste="return false" οncοpy="return false;" oncut="return false;"</code>

4、在收藏夹中显示出你的图标
<code lang='html' width='auto' height='auto'><link rel="Bookmark" href="favicon.ico"/></code>

5、关闭输入法
<code lang='html' width='auto' height='auto'><input style="ime-mode:disabled"/></code>
<!--more-->

6、永远都会带着框架
<code lang='javascript' width='auto' height='auto'><script language="JavaScript"><!--if(window == top)top.location.href = "frames.htm"; //frames.htm为框架网页// --></script></code>

7、防止被人frame
<code lang='javascript' width='auto' height='auto'><script LANGUAGE=JAVASCRIPT><!--
if(top.location != self.location)top.location=self.location;
// --></script></code>

8、网页将不能被另存为
<code lang='html' width='auto' height='auto'><noscript><iframe src=*.html></iframe></noscript></code>

原文地址: javascript实用代码 | http://orgcent.com/javascript-snippets/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值