219 lines
4.7 KiB
Plaintext
219 lines
4.7 KiB
Plaintext
|
|
|||
|
|
|||
|
document.onkeydown = function()
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD>F5<46><35>F11
|
|||
|
if ( window.event.keyCode == 116 || window.event.keyCode == 117 || window.event.keyCode == 122)
|
|||
|
{
|
|||
|
event.keyCode = 0;
|
|||
|
return false;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD> Alt+ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>,<2C><><EFBFBD><EFBFBD> Alt+ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>
|
|||
|
if ((window.event.altKey)
|
|||
|
|
|||
|
&&((window.event.keyCode == 37) || (window.event.keyCode == 39)))
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD>CTRL+N
|
|||
|
if (window.event.ctrlKey && window.event.keyCode == 78)
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD>CTRL+R
|
|||
|
if (window.event.ctrlKey && window.event.keyCode == 82)
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD>CTRL+H
|
|||
|
if (window.event.ctrlKey && window.event.keyCode == 72)
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD>CTRL+I
|
|||
|
if (window.event.ctrlKey && window.event.keyCode == 73)
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD>SHIFT+F10
|
|||
|
if (window.event.shiftKey && window.event.keyCode == 121)
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
//<2F>DZ༭<C7B1><E0BCAD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BACK SPACE
|
|||
|
if (window.event.keyCode == 8)
|
|||
|
{
|
|||
|
var e= window.event.srcElement;
|
|||
|
if ((e.tagName.toUpperCase() != "INPUT" && e.tagName.toUpperCase() != "TEXTAREA") || (e.type.toUpperCase() != "TEXT" && e.type.toUpperCase() != "PASSWORD" && e.type.toUpperCase() != "TEXTAREA" && e.type.toUpperCase()!="FILE") ||(!e.isContentEditable) || (e.disabled) )
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
/*
|
|||
|
//<2F>DZ༭<C7B1><E0BCAD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҽ<EFBFBD><D2BC>˵<EFBFBD>
|
|||
|
document.oncontextmenu = function()
|
|||
|
{
|
|||
|
var e= event.srcElement;
|
|||
|
if ((e.tagName != "INPUT" && e.tagName != "TEXTAREA") || (e.type.toUpperCase() != "TEXT" && e.type.toUpperCase() != "PASSWORD" && e.type.toUpperCase() != "TEXTAREA" && e.type.toUpperCase() != "FILE"))
|
|||
|
//if (e.tagName != "INPUT" || e.type != "text")
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
}
|
|||
|
*/
|
|||
|
|
|||
|
|
|||
|
function delete_click()
|
|||
|
{
|
|||
|
return confirm("ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|||
|
}
|
|||
|
window.onload =function()
|
|||
|
{
|
|||
|
if(getcookie("height")!=null)
|
|||
|
document.body.scrollTop=getcookie("height");
|
|||
|
}
|
|||
|
|
|||
|
window.onunload =function ()
|
|||
|
{
|
|||
|
setcookie("height",document.body.scrollTop);
|
|||
|
}
|
|||
|
function getcookie(sName)
|
|||
|
{
|
|||
|
var aCookie = document.cookie.split("; ");
|
|||
|
for (var i=0; i < aCookie.length; i++)
|
|||
|
{
|
|||
|
var aCrumb = aCookie[i].split("=");
|
|||
|
if (sName == aCrumb[0])
|
|||
|
return unescape(aCrumb[1]);
|
|||
|
}
|
|||
|
return null;
|
|||
|
}
|
|||
|
|
|||
|
function setcookie(sName, sValue)
|
|||
|
{
|
|||
|
date = new Date();
|
|||
|
date.setTime(date.getTime()+5000); //5 second
|
|||
|
document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
function openwin(Name)
|
|||
|
{
|
|||
|
winSub=window.open(Name,'aaa','width=780,center=1,help=no,scrollbars=1,maxnimize=yes') ;
|
|||
|
winSub.focus();
|
|||
|
}
|
|||
|
|
|||
|
function get_cookie(Name)
|
|||
|
{
|
|||
|
var search = Name + "="
|
|||
|
var returnvalue = "";
|
|||
|
if (document.cookie.length > 0)
|
|||
|
{
|
|||
|
offset = document.cookie.indexOf(search) ;
|
|||
|
if (offset != -1)
|
|||
|
{
|
|||
|
offset += search.length
|
|||
|
end = document.cookie.indexOf(";", offset);
|
|||
|
if (end == -1)
|
|||
|
end = document.cookie.length;
|
|||
|
returnvalue=unescape(document.cookie.substring(offset, end)) ;
|
|||
|
alert(returnvalue);
|
|||
|
}
|
|||
|
}
|
|||
|
return returnvalue;
|
|||
|
}
|
|||
|
|
|||
|
function loadpopup(Name,id)
|
|||
|
{
|
|||
|
if (get_cookie(id)=='')
|
|||
|
{
|
|||
|
openwin(Name)
|
|||
|
document.cookie=id+"=yes"
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
function windowclose(id)
|
|||
|
{
|
|||
|
document.cookie(id)=='';
|
|||
|
}
|
|||
|
|
|||
|
/*
|
|||
|
function window.onunload()
|
|||
|
{
|
|||
|
if (event.clientX < 0 && event.clientY < 0)
|
|||
|
window.showModalDialog('~/logout.aspx' );
|
|||
|
}
|
|||
|
*/
|
|||
|
|
|||
|
function GetXmlHttpObject()
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD>XMLHttpRequest<73><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͺͽ<CDBA><CDBD><EFBFBD>HTTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
xmlHttpObj = null;
|
|||
|
try
|
|||
|
{
|
|||
|
// FireFox Opera 8.0+ Safari
|
|||
|
xmlHttpObj = new XMLHttpRequest();
|
|||
|
if(xmlHttpObj.overrideMimeType)
|
|||
|
{
|
|||
|
xmlHttpObj.overrideMimeType('text/xml');
|
|||
|
}
|
|||
|
}
|
|||
|
catch(e)
|
|||
|
{
|
|||
|
// IE
|
|||
|
try
|
|||
|
{
|
|||
|
xmlHttpObj = new ActiveXObject("Msxml2.XMLHTTP");
|
|||
|
}
|
|||
|
catch(e)
|
|||
|
{
|
|||
|
xmlHttpObj = new ActiveXObject("Microsoft.XMLHTTP");
|
|||
|
}
|
|||
|
}
|
|||
|
return xmlHttpObj;
|
|||
|
}
|
|||
|
|
|||
|
function StateChanged()
|
|||
|
{
|
|||
|
if(___xmlHttp.readyState == 4)
|
|||
|
{
|
|||
|
if(___xmlHttp.status == 200)
|
|||
|
{
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
var ___xmlHttp=null;
|
|||
|
function ClearSession()
|
|||
|
{
|
|||
|
|
|||
|
if(___xmlHttp==null)
|
|||
|
___xmlHttp = GetXmlHttpObject();
|
|||
|
if(___xmlHttp == null)
|
|||
|
return false;
|
|||
|
|
|||
|
var url = "?___command=ClearSession&___clientRandom=" + Math.random();
|
|||
|
|
|||
|
___xmlHttp.open("GET", url, true);
|
|||
|
___xmlHttp.onreadystatechange = StateChanged;
|
|||
|
___xmlHttp.send(null);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
window.onbeforeunload = function()
|
|||
|
{
|
|||
|
var n = window.event.screenX - window.screenLeft;
|
|||
|
var b = n > document.documentElement.scrollWidth-20;
|
|||
|
if(b && window.event.clientY < 0 || window.event.altKey)
|
|||
|
{
|
|||
|
ClearSession();
|
|||
|
}
|
|||
|
}
|