⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showlist.js

📁 用JSP JAVA 做的 系统 只是初来扎到还望西黄!别乱来哦!
💻 JS
📖 第 1 页 / 共 5 页
字号:
if(!String.trim)String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
var DHTMLSuite = new Object();
var standardObjectsCreated = false;	// The classes below will check this variable, if it is false, default help objects will be created
DHTMLSuite.eventElements = new Array();	// Array of elements that has been assigned to an event handler.
DHTMLSuite.createStandardObjects = function()
{
DHTMLSuite.clientInfoObj = new DHTMLSuite.clientInfo();	// Create browser info object
DHTMLSuite.clientInfoObj.init();
if(!DHTMLSuite.configObj){	// If this object isn't allready created, create it.
DHTMLSuite.configObj = new DHTMLSuite.config();	// Create configuration object.
DHTMLSuite.configObj.init();
}
DHTMLSuite.commonObj = new DHTMLSuite.common();	// Create configuration object.
DHTMLSuite.variableStorage = new DHTMLSuite.globalVariableStorage();;	// Create configuration object.
DHTMLSuite.commonObj.init();
DHTMLSuite.domQueryObj = new DHTMLSuite.domQuery();
window.onunload = function() { DHTMLSuite.commonObj.__clearMemoryGarbage(); }
standardObjectsCreated = true;
}
DHTMLSuite.config = function()
{
var imagePath;	// Path to images used by the classes.
var cssPath;	// Path to CSS files used by the DHTML suite.
var defaultCssPath;
var defaultImagePath;
}
DHTMLSuite.config.prototype = {
init:function()
{
this.imagePath = '/images_dhtmlsuite/';	// Path to images
this.cssPath = '/css_dhtmlsuite/';	// Path to images
this.defaultCssPath = this.cssPath;
this.defaultImagePath = this.imagePath;
}
,
setCssPath:function(newCssPath)
{
this.cssPath = newCssPath;
}
,
resetCssPath:function()
{
this.cssPath = this.defaultCssPath;
}
,
resetImagePath:function()
{
this.imagePath = this.defaultImagePath;
}
,
setImagePath:function(newImagePath)
{
this.imagePath = newImagePath;
}
}
DHTMLSuite.globalVariableStorage = function()
{
var menuBar_highlightedItems;	// Array of highlighted menu bar items
this.menuBar_highlightedItems = new Array();
var arrayOfDhtmlSuiteObjects;	// Array of objects of class menuItem.
this.arrayOfDhtmlSuiteObjects = new Array();
var ajaxObjects;
this.ajaxObjects = new Array();
}
DHTMLSuite.globalVariableStorage.prototype = {
}
DHTMLSuite.common = function()
{
var loadedCSSFiles;	// Array of loaded CSS files. Prevent same CSS file from being loaded twice.
var cssCacheStatus;	// Css cache status
var eventElements;
var isOkToSelect;	// Boolean variable indicating if it's ok to make text selections
this.okToSelect = true;
this.cssCacheStatus = true;	// Caching of css files = on(Default)
this.eventElements = new Array();
}
DHTMLSuite.common.prototype = {
init:function()
{
this.loadedCSSFiles = new Array();
}
,
loadCSS:function(cssFileName)
{
if(!this.loadedCSSFiles[cssFileName]){
this.loadedCSSFiles[cssFileName] = true;
var linkTag = document.createElement('LINK');
if(!this.cssCacheStatus){
if(cssFileName.indexOf('?')>=0)cssFileName = cssFileName + '&'; else cssFileName = cssFileName + '?';
cssFileName = cssFileName + 'rand='+ Math.random();	// To prevent caching
}
linkTag.href = DHTMLSuite.configObj.cssPath + cssFileName;
linkTag.rel = 'stylesheet';
linkTag.media = 'screen';
linkTag.type = 'text/css';
document.getElementsByTagName('HEAD')[0].appendChild(linkTag);
}
}
,
getTopPos:function(inputObj)
{
var returnValue = inputObj.offsetTop;
while((inputObj = inputObj.offsetParent) != null){
if(inputObj.tagName!='HTML'){
returnValue += (inputObj.offsetTop - inputObj.scrollTop);
if(document.all)returnValue+=inputObj.clientTop;
}
}
return returnValue;
}
,
__setOkToMakeTextSelections:function(okToSelect){
this.okToSelect = okToSelect;
}
,
__getOkToMakeTextSelections:function()
{
return this.okToSelect;
}
,
setCssCacheStatus:function(cssCacheStatus)
{
this.cssCacheStatus = cssCacheStatus;
}
,
getLeftPos:function(inputObj)
{
var returnValue = inputObj.offsetLeft;
while((inputObj = inputObj.offsetParent) != null){
if(inputObj.tagName!='HTML'){
returnValue += inputObj.offsetLeft;
if(document.all)returnValue+=inputObj.clientLeft;
}
}
return returnValue;
}
,
getCookie:function(name) {
var start = document.cookie.indexOf(name+"=");
var len = start+name.length+1;
if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
if (start == -1) return null;
var end = document.cookie.indexOf(";",len);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(len,end));
}
,
setCookie:function(name,value,expires,path,domain,secure) {
expires = expires * 60*60*24*1000;
var today = new Date();
var expires_date = new Date( today.getTime() + (expires) );
var cookieString = name + "=" +escape(value) +
( (expires) ? ";expires=" + expires_date.toGMTString():"") +
( (path) ? ";path=" + path:"") +
( (domain) ? ";domain=" + domain:"") +
( (secure) ? ";secure":"");
document.cookie = cookieString;
}
,
deleteCookie:function( name, path, domain )
{
if ( this.getCookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path:"") +
( ( domain ) ? ";domain=" + domain:"" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
,
cancelEvent:function()
{
return false;
}
,
addEvent:function(whichObject,eventType,functionName,suffix)
{
if(!suffix)suffix = '';
if(whichObject.attachEvent){
whichObject['e'+eventType+functionName+suffix] = functionName;
whichObject[eventType+functionName+suffix] = function(){whichObject['e'+eventType+functionName+suffix]( window.event );}
whichObject.attachEvent( 'on'+eventType, whichObject[eventType+functionName+suffix] );
} else
whichObject.addEventListener(eventType,functionName,false);
this.__addEventElement(whichObject);
}
,
removeEvent:function(whichObject,eventType,functionName)
{
if(whichObject.detachEvent){
whichObject.detachEvent('on'+eventType, whichObject[eventType+functionName]);
whichObject[eventType+functionName] = null;
} else
whichObject.removeEventListener(eventType,functionName,false);
}
,
__clearMemoryGarbage:function()
{
if(!DHTMLSuite.clientInfoObj.isMSIE)return;
for(var no in DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects){
DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[no] = false;
}
for(var no=0;no<DHTMLSuite.eventElements.length;no++){
DHTMLSuite.eventElements[no].onclick = null;
DHTMLSuite.eventElements[no].onmousedown = null;
DHTMLSuite.eventElements[no].onmousemove = null;
DHTMLSuite.eventElements[no].onmouseout = null;
DHTMLSuite.eventElements[no].onmouseover = null;
DHTMLSuite.eventElements[no].onmouseup = null;
DHTMLSuite.eventElements[no].onfocus = null;
DHTMLSuite.eventElements[no].onblur = null;
DHTMLSuite.eventElements[no].onkeydown = null;
DHTMLSuite.eventElements[no].onkeypress = null;
DHTMLSuite.eventElements[no].onkeyup = null;
DHTMLSuite.eventElements[no].onselectstart = null;
DHTMLSuite.eventElements[no].ondragstart = null;
DHTMLSuite.eventElements[no].oncontextmenu = null;
DHTMLSuite.eventElements[no].onscroll = null;
}
window.onunload = null;
DHTMLSuite = null;
}
,
__addEventElement:function(el)
{
DHTMLSuite.eventElements[DHTMLSuite.eventElements.length] = el;
}
,
getSrcElement:function(e)
{
var el;
if (e.target) el = e.target;
else if (e.srcElement) el = e.srcElement;
if (el.nodeType == 3) // defeat Safari bug
el = el.parentNode;
return el;
}
,
isObjectClicked:function(obj,e)
{
var src = this.getSrcElement(e);
var string = src.tagName + '(' + src.className + ')';
if(src==obj)return true;
while(src.parentNode && src.tagName.toLowerCase()!='html'){
src = src.parentNode;
string = string + ',' + src.tagName + '(' + src.className + ')';
if(src==obj)return true;
}
return false;
}
,
getObjectByClassName:function(e,className)
{
var src = this.getSrcElement(e);
if(src.className==className)return src;
while(src && src.tagName.toLowerCase()!='html'){
src = src.parentNode;
if(src.className==className)return src;
}
return false;
}
,
getObjectByAttribute:function(e,attribute)
{
var src = this.getSrcElement(e);
var att = src.getAttribute(attribute);
if(!att)att = src[attribute];
if(att)return src;
while(src && src.tagName.toLowerCase()!='html'){
src = src.parentNode;
var att = src.getAttribute('attribute');
if(!att)att = src[attribute];
if(att)return src;
}
return false;
}
,
getUniqueId:function()
{
var no = Math.random() + '';
no = no.replace('.','');
var no2 = Math.random() + '';
no2 = no2.replace('.','');
return no + no2;
}
,
getAssociativeArrayFromString:function(propertyString)
{
if(!propertyString)return;
var retArray = new Array();
var items = propertyString.split(/,/g);
for(var no=0;no<items.length;no++){
var tokens = items[no].split(/:/);
retArray[tokens[0]] = tokens[1];
}
return retArray;
}
}
DHTMLSuite.clientInfo = function()
{
var browser;			// Complete user agent information
var isOpera;			// Is the browser "Opera"
var isMSIE;				// Is the browser "Internet Explorer"
var isOldMSIE;			// Is this browser and older version of Internet Explorer ( by older, we refer to version 6.0 or lower)
var isFirefox;			// Is the browser "Firefox"
var navigatorVersion;	// Browser version
}
DHTMLSuite.clientInfo.prototype = {
init:function()
{
this.browser = navigator.userAgent;
this.isOpera = (this.browser.toLowerCase().indexOf('opera')>=0)?true:false;
this.isFirefox = (this.browser.toLowerCase().indexOf('firefox')>=0)?true:false;
this.isMSIE = (this.browser.toLowerCase().indexOf('msie')>=0)?true:false;
this.isOldMSIE = (this.browser.toLowerCase().match(/msie [0-6]/gi))?true:false;
this.isSafari = (this.browser.toLowerCase().indexOf('safari')>=0)?true:false;
this.navigatorVersion = navigator.appVersion.replace(/.*?MSIE (\d\.\d).*/g,'$1')/1;
}
,
getBrowserWidth:function()
{
return document.documentElement.offsetWidth;
}
,
getBrowserHeight: function()
{
return document.documentElement.offsetHeight;
}
}
DHTMLSuite.domQuery = function()
{
document.getElementsByClassName = this.getElementsByClassName;
document.getElementsByAttribute = this.getElementsByAttribute;
}
DHTMLSuite.domQuery.prototype = {
getElementsByClassName:function(className,inputObj)
{
var returnArray = new Array();
if(inputObj)
var allElements = inputObj.getElementsByTagName('*');
else
var allElements = document.getElementsByTagName('*');
for(var no=0;no<allElements.length;no++){
if(allElements[no].className==className)returnArray[returnArray.length] = allElements[no];
}
return returnArray;
}
,
getElementsByAttribute:function(attribute,attributeValue,inputObj)
{
var returnArray = new Array();
if(inputObj)
var allElements = inputObj.getElementsByTagName('*');
else
var allElements = document.getElementsByTagName('*');
for(var no=0;no<allElements.length;no++){
var att = allElements[no].getAttribute(attribute);
if(!attributeValue){

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -