node.js学习之自己编写命令行工具CLI
2016-03-03 18:34
801 查看
[size=x-small]<script type="text/javascript">
function key(){
if(event.shiftKey){
window.close();}
//禁止Shift
if(event.altKey){
window.close();}
//禁止Alt
if(event.ctrlKey){
window.close();}
//禁止Ctrl
return false;}
document.onkeydown=key;
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu(){
event.cancelBubble = true
event.returnValue = false;
return false;}
function norightclick(e){
if (window.Event){
if (e.which == 2 || e.which == 3)
return false;}
else
if (event.button == 2 || event.button == 3){
event.cancelBubble = true
event.returnValue = false;
return false;}
}
//禁右键
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>
<body onselectstart="return false"; onpaste="return false";>[/size]
function key(){
if(event.shiftKey){
window.close();}
//禁止Shift
if(event.altKey){
window.close();}
//禁止Alt
if(event.ctrlKey){
window.close();}
//禁止Ctrl
return false;}
document.onkeydown=key;
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu(){
event.cancelBubble = true
event.returnValue = false;
return false;}
function norightclick(e){
if (window.Event){
if (e.which == 2 || e.which == 3)
return false;}
else
if (event.button == 2 || event.button == 3){
event.cancelBubble = true
event.returnValue = false;
return false;}
}
//禁右键
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>
<body onselectstart="return false"; onpaste="return false";>[/size]
相关文章推荐
- 系列文章--Node.js学习笔记系列
- 【nodejs】imooc上的学习笔记
- node.Js学习-- 创建服务器简要步骤
- NodeJs【自学笔记】1
- nw.js node-webkit系列(16)可能会遇到的故障及故障排除
- web Update node.js & npm on Mac
- leetcode19:Remove Nth Node From End of List
- Weblogic 两台Server Node 使用一台控制台(12c-version)
- 测试Node.js 应用程序
- nw.js node-webkit系列(15)如何使用内部模块和第三方模块进行开发
- 模拟namenode宕机:数据块损坏,该如何修复
- nodejs express request 和 response 对象的具体介绍:
- 初步使用Node连接Mysql数据库
- 《Inode与Block重要知识总结核心讲解》
- 使用Node.js+Socket.IO搭建WebSocket实时应用
- leetcode第24题——**Swap Nodes in Pairs
- [LeetCode]237. Delete Node in a Linked List
- 一个基于node与mysql的打卡小应用
- lintcode-easy-Nth to Last Node in List Show result
- 《Node.js开发实战详解》学习笔记