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

推荐订阅源

D
Docker
Microsoft Azure Blog
Microsoft Azure Blog
云风的 BLOG
云风的 BLOG
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LangChain Blog
P
Privacy & Cybersecurity Law Blog
Hugging Face - Blog
Hugging Face - Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
A
Arctic Wolf
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
The GitHub Blog
The GitHub Blog
P
Privacy International News Feed
WordPress大学
WordPress大学
U
Unit 42
S
Securelist
T
The Exploit Database - CXSecurity.com
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
Latest news
Latest news
Hacker News: Ask HN
Hacker News: Ask HN
小众软件
小众软件
Know Your Adversary
Know Your Adversary
The Cloudflare Blog
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
Security Latest
Security Latest
Google DeepMind News
Google DeepMind News
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Simon Willison's Weblog
Simon Willison's Weblog
博客园 - Franky
Y
Y Combinator Blog
博客园 - 叶小钗
Security Archives - TechRepublic
Security Archives - TechRepublic
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
S
Secure Thoughts
T
Threat Research - Cisco Blogs
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
Microsoft Security Blog
Microsoft Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
M
MIT News - Artificial intelligence

博客园 - 感觉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>