转自:博客全程 - 博客大巴
<noscript>
<iframe scr="*.htm"></iframe>
</noscript>
<script language="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);
//swordmaple javascript article.
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
//-->
</script>
<body ; ;>
<noscript>
<iframe scr="*.htm" id="t"></iframe>
</noscript>
运行方式(本文转自[博客全程]http://hi555.blogbus.com,转载请注明出处)只有有人在该网页中按shift,alt或ctrl,该网页都会自动关掉,右键也屏蔽掉了。当然,如果,大家对该运行方式不满意,不想该网页关掉的话,只要将上面带红色的close改成open
<iframe scr="*.htm"></iframe>
</noscript>
<script language="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);
//swordmaple javascript article.
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
//-->
</script>
<body ; ;>
<noscript>
<iframe scr="*.htm" id="t"></iframe>
</noscript>
运行方式(本文转自[博客全程]http://hi555.blogbus.com,转载请注明出处)只有有人在该网页中按shift,alt或ctrl,该网页都会自动关掉,右键也屏蔽掉了。当然,如果,大家对该运行方式不满意,不想该网页关掉的话,只要将上面带红色的close改成open
本消息来自: http://www.w521h.com/