惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Troy Hunt's Blog
Schneier on Security
Schneier on Security
N
News | PayPal Newsroom
Hacker News: Ask HN
Hacker News: Ask HN
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
N
News and Events Feed by Topic
V
Vulnerabilities – Threatpost
Cyberwarzone
Cyberwarzone
K
Kaspersky official blog
P
Privacy & Cybersecurity Law Blog
P
Privacy International News Feed
WordPress大学
WordPress大学
U
Unit 42
PCI Perspectives
PCI Perspectives
S
Schneier on Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
I
Intezer
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
Martin Fowler
Martin Fowler
B
Blog
美团技术团队
T
The Blog of Author Tim Ferriss
C
Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
酷 壳 – CoolShell
酷 壳 – CoolShell
The Last Watchdog
The Last Watchdog
J
Java Code Geeks
博客园_首页
A
About on SuperTechFans
Vercel News
Vercel News
Attack and Defense Labs
Attack and Defense Labs
H
Heimdal Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
小众软件
小众软件
H
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
The Exploit Database - CXSecurity.com
Y
Y Combinator Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Webroot Blog
Webroot Blog
T
Tenable Blog

博客园 - 感觉De味道

CRC16_Check 源代码类修改版 HI baidu~~~~~~开通了~~~ [转] js 选时间的控件 - 感觉De味道 自我复制的简单实现(C#) 使用C#调用外部命令 - 感觉De味道 - 博客园 VS2005 中比较有用的快捷键 C#让windows程序只运行一次 [转] - 感觉De味道 - 博客园 只允许一个进程运行的实例 网址大全[收集网上大部份好的开源网] C#模拟MSN窗体抖动 衔接UI线程和管理后台工作线程的类(多线程、异步调用)[转] 关于线程问题 [转] 扫雷高手版出台 (本站原创) 写了一个操作XML文件的类 用C#捕捉键盘和鼠标 类型转换(本站原创) 一个简单的C#托盘程序(本站原创) 232串口通信程序刚完成(本站原创) 木马代码
javascript 常用小技巧 - 感觉De味道 - 博客园
感觉De味道 · 2007-09-14 · via 博客园 - 感觉De味道

   Js 常用小技巧

1 屏蔽弹出窗口最大化按钮

代码如下:
<script language="Javascript">
<!-- script begins here by POPOEVER
function alwaysRaised() {
var newWindow = window.open("http://andrepan.topcool.net/index.html","","Height=400,Width=300,alwaysRaised");
}
//-->
</script>
2 禁止点击鼠标右键
<script language="javascript">
function click() {
if (event.button==2) {
alert('对不起,本页的内容不经允许不得拷备。')
}
}
document.onmousedown=click
</script>

3 彻底屏蔽鼠标右键
oncontextmenu="window.event.returnValue=false"
<table border oncontextmenu=return(false)><td>no</table> 可用于Table

4 屏蔽ctrl+N功能
<body onkeydown='if(event.keyCode==78&&event.ctrlKey)return false;'>

5 网页文字不被选中
<HTML>
<body onselectstart="return false">
无忧脚本<br>无忧脚本<br>无忧脚本<br>无忧脚本<br>无忧脚本<br>无忧脚本<br>无忧脚本</body>
</html>

6 不准粘贴
onpaste="return false"

7 防止复制
oncopy="return false;" oncut="return false;"

8 IE地址栏前换成自己的图标
<link rel="Shortcut Icon" href="favicon.ico">

9 在收藏夹中显示出自己的图标
<link rel="Bookmark" href="favicon.ico">

10 关闭输入法
<input style="ime-mode:disabled">

11 防止被人frame
<SCRIPT LANGUAGE=JAVASCRIPT><!--
if (top.location != self.location)top.location=self.location;
// --></SCRIPT>

12 防止网页另存为
<html>
<noscript><iframe src=*.html></iframe></noscript>
<body >
</body>
</html>

13 屏蔽功能键Shift,Alt,Ctrl
<script>
function look(){
if(event.shiftKey)
alert("禁止按Shift键!"); //可以换成ALT CTRL
}
document.onkeydown=look;
</script>

14 网页不会被缓存
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
或者<META HTTP-EQUIV="expires" CONTENT="0">

15 不要滚动条
让竖条没有:
<body style="overflow:scroll;overflow-y:hidden">
</body>
让横条没有:
<body style="overflow:scroll;overflow-x:hidden">
</body>
两个都去掉?更简单了
<body scroll="no">
</body>

16 去掉图片链接点击后,图片周围的虚线
<a href="#" onFocus="this.blur()"><img src="logo.jpg" border=0></a>

17 在页面中如何加入不是满铺的背景图片,拉动页面时背景图不动
<STYLE>
body
{background-image:url(logo.gif); background-repeat:no-repeat;

background-position:center;background-attachment: fixed}
</STYLE>

18 脚本永不出错
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
</SCRIPT>

19 屏蔽网页上的所有按键
<html>
<head>
</head>
<body leftmargin=0 topmargin=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()">
</body>
</html>