时间:2021-05-26
/*---------------------------------------------------------------------------*\
|Subject:JavaScriptFramework
|Author:meizz
|Created:2005-02-27
|Version:2006-08-11
|-----------------------------------
|MSN:huangfr@msn.comQQ:112889082
|http://Copyright(c)meizzMIT-stylelicense
|Theabovecopyrightnoticeandthispermissionnoticeshallbe
|includedinallcopiesorsubstantialportionsoftheSoftware
\*---------------------------------------------------------------------------*/
window.System=function(){this.setHashCode();}
System.debug=true;//false
System._codebase={};
try
{
if(window!=parent&&parent.System&&parent.System._codebase)
System._codebase=parent.System._codebase;
elseif("undefined"!=typeofopener&&opener.System&&opener.System._codebase)
System._codebase=opener.System._codebase;
elseif("undefined"!=typeofdialogArguments&&dialogArguments.System)
System._codebase=dialogArguments.System._codebase;
}
catch(ex){}
System.MISSING_ARGUMENT="Missingargument";
System.ARGUMENT_PARSE_ERROR="Theargumentcannotbeparsed";
System.NOT_SUPPORTED_XMLHTTP="YourbrowserdonotsupportXMLHttp";
System.FILE_NOT_FOUND="Filenotfound";
System.MISCODING="MaybefileencodingisnotANSIorUTF-8";
System.NAMESPACE_ERROR="nonstandardnamespace";
System.hashCounter=0;
System.currentVersion="20060811";
vart=document.getElementsByTagName("SCRIPT");
t=(System.scriptElement=t[t.length-1]).src.replace(/\\/g,"/");
System.incorporate=function(d,s){for(variins)d[i]=s[i];returnd;};
System.path=(t.lastIndexOf("/")<0)?".":t.substring(0,t.lastIndexOf("/"));
System.getUniqueId=function(){return"mz_"+(System.hashCounter++).toString(36);};
System.toHashCode=function(e)
{
if("undefined"!=typeofe.hashCode)returne.hashCode;
returne.hashCode=System.getUniqueId();
};
System.supportsXmlHttp=function()
{
return"object"==typeof(System._xmlHttp||(System._xmlHttp=newXMLHttpRequest()));
};
System._getPrototype=function(namespace,argu)
{
if("undefined"==typeofSystem._prototypes[namespace])returnnewSystem();
for(vara=[],i=0;i<argu.length;i++)a[i]="argu["+i+"]";
returneval("new(System._prototypes['"+namespace+"'])("+a.join(",")+")");
};
System.ie=navigator.userAgent.indexOf("MSIE")>0&&!window.opera;
System.ns=navigator.vendor=="Netscape";
System._alert=function(msg){if(System.debug)alert(msg);};
System._parseResponseText=function(s)
{
if(null==s||"\uFFFD"==s.charAt(0)){System._alert(System.MISCODING);return"";}
if("\xef"==s.charAt(0))s=s.substr(3);//forfirefox
returns.replace(/(^|\n)\s*\/\/+\s*((Using|Import|Include)\((\"|\'))/g,"$1$2");
};
if(window.ActiveXObject&&(System.ie||!window.XMLHttpRequest))
{
window.XMLHttpRequest=function()
{
varmsxmls=['MSXML3','MSXML2','Microsoft'],ex;
for(vari=0;i<msxmls.length;i++)
try{returnnewActiveXObject(msxmls[i]+'.XMLHTTP')}catch(ex){}
System._xmlHttp="mz";thrownewError(System.NOT_SUPPORTED_XMLHTTP);
}
}
System.load=function(namespace,path)
{
try
{
if(System.supportsXmlHttp()){path=System._mapPath(namespace,path);
varx=System._xmlHttp;x.open("GET",path,false);x.send(null);
if(x.readyState==4)
{
if(x.status==0||/^file\:/i.test(path))
returnSystem._parseResponseText(x.responseText);
elseif(x.status==200)returnSystem._parseResponseText(x.responseText);
elseif(x.status==404)System._alert(namespace+"\n"+System.FILE_NOT_FOUND);
elsethrownewError(x.status+":"+x.statusText);}
}elseSystem._alert(System.NOT_SUPPORTED_XMLHTTP);
}
catch(ex){System._alert(namespace+"\n"+ex.message);}return"";
};
System._eval=function(namespace,path)
{
//alert("System._eval(\""+namespace+"\")=\r\n"+System._codebase[namespace]);
try{if(window.execScript)window.execScript(System._codebase[namespace]);else
{
varscript=document.createElement("SCRIPT");script.type="text/javascript";
script.innerHTML="eval(System._codebase['"+namespace+"']);";
document.getElementsByTagName("HEAD")[0].appendChild(script);
setTimeout(function(){script.parentNode.removeChild(script)},99);
}}catch(ex){System._alert("Syntaxerroronload"+namespace);}
System._existences[namespace]=System._mapPath(namespace,path);
};
System._exist=function(namespace,path)
{
if("undefined"==typeofSystem._existences[namespace])returnfalse;
returnSystem._existences[namespace]==System._mapPath(namespace,path);
};
System._mapPath=function(namespace,path)
{
if("string"==typeofpath&&path.length>3)returnpath.toLowerCase();
varp=(System.path+"/"+namespace.replace(/\./g,"/")+".js").toLowerCase();
returnp+(("undefined"==typeofpath||path)?"":"?t="+Math.random());
};
window.Using=function(namespace,path,rename)
{
if(System._exist(namespace,path)){
vars=window[namespace.substr(namespace.lastIndexOf(".")+1)];
if(s!=System._prototypes[namespace])s=System._prototypes[namespace];return}
varcode=namespace+".";if(!/((^|\.)[\w\$]+)+$/.test(namespace))
thrownewError(namespace+System.NAMESPACE_ERROR);
for(vari=code.indexOf(".");i>-1;i=code.indexOf(".",i+1)){
vare=code.substring(0,i),s=(e.indexOf(".")==-1)?"window[\""+e+"\"]":e;
if(e&&"undefined"==typeof(s)){
eval(s+"=function(){returnSystem._getPrototype(\""+e+"\",arguments)}");}}
if("undefined"==typeofpath&&"string"==typeofSystem._codebase[namespace])
{
System._eval(namespace,path);}else{if(code=System.load(namespace,path)){
e="$"+System.getUniqueId()+"__id"+newDate().getTime()+"$";
s="function"+e+"(){\r\n"+code+";\r\nSystem._prototypes['";
code=namespace.substr(namespace.lastIndexOf(".")+1);
s+=namespace+"']=window['"+(rename||code)+"']="+code+";\r\n}"+e+"();";
System._codebase[namespace]=s;s="";System._eval(namespace,path);}
}
};
window.Import=function(namespace,path,rename){Using(namespace,path,rename)};
window.Instance=function(hashCode){returnSystem._instances[hashCode]};
window.Include=function(namespace,path)
{
if(System._exist(namespace,path))return;
varcode;if(!/((^|\.)[\w\$]+)+$/.test(namespace))
thrownewError(namespace+System.NAMESPACE_ERROR);
if("undefined"==typeofpath&&"string"==typeof(System._codebase[namespace]))
{
System._eval(namespace,path);}elseif(System.supportsXmlHttp()){
if(code=System.load(namespace,path)){System._codebase[namespace]=code;
System._eval(namespace,path);}}else{
varscript=document.createElement("SCRIPT");script.type="text/javascript";
script.src=System._existences[namespace]=System._mapPath(namespace,path);
document.getElementsByTagName("HEAD")[0].appendChild(script);
setTimeout(function(){script.parentNode.removeChild(script)},99);
}
};
Function.READ=1;Function.WRITE=2;Function.READ_WRITE=3;
Function.prototype.addProperty=function(name,initValue,r_w)
{
varcapital=name.charAt(0).toUpperCase()+name.substr(1);
r_w=r_w||Function.READ_WRITE;name="_"+name;varp=this.prototype;
if("undefined"!=typeofinitValue)p[name]=initValue;
if(r_w&Function.READ)p["get"+capital]=function(){returnthis[name];};
if(r_w&Function.WRITE)p["set"+capital]=function(v){this[name]=v;};
};
Function.prototype.Extends=function(SuperClass,ClassName)
{
varop=this.prototype,i,p=this.prototype=newSuperClass();
if(ClassName)p._className=ClassName;for(iinop)p[i]=op[i];
if(p.hashCode)deleteSystem._instances[p.hashCode];returnp;
};
System._instances={};
System._prototypes=
{
"System":System,
"System.Object":System,
"System.Event":System.Event
};
System._existences=
{
"System":System._mapPath("System"),
"System.Event":System._mapPath("System.Event"),
"System.Object":System._mapPath("System.Object")
};
t=System.Extends(Object,"System");System.Object=System;
t.decontrol=function(){vart;if(t=this.hashCode)deleteSystem._instances[t]};
t.addEventListeners=function(type,handle)
{
if("function"!=typeofhandle)
thrownewError(this+"addEventListener:"+handle+"isnotafunction");
if(!this._listeners)this._listeners={};
varid=System.toHashCode(handle),t=this._listeners;
if("object"!=typeoft[type])t[type]={};t[type][id]=handle;
};
t.removeEventListener=function(type,handle)
{
if(!this._listeners)this._listeners={};vart=this._listeners;
if(!t[type])return;varid=System.toHashCode(handle);
if(t[type][id])deletet[type][id];if(t[type])deletet[type];
};
t.dispatchEvent=function(evt)
{
if(!this._listeners)this._listeners={};
vari,t=this._listeners,p=evt.type;
evt.target=evt.srcElement=this;if(this[p])this[p](evt);
if("object"==typeoft[p])for(iint[p])t[p][i].call(this,evt);
deleteevt.target;deleteevt.srcElement;returnevt.returnValue;
};
t.setHashCode=function()
{
System._instances[(this.hashCode=System.getUniqueId())]=this;
};
t.getHashCode=function()
{
if(!this.hashCode)this.setHashCode();returnthis.hashCode;
};
t.toString=function(){return"[object"+(this._className||"Object")+"]";};
System.Event=function(type){this.type=type;};
t=System.Event.Extends(System,"System.Event");
t.returnValue=true;
t.cancelBubble=false;
t.target=t.srcElement=null;
t.stopPropagation=function(){this.cancelBubble=true;};
t.preventDefault=function(){this.returnValue=false;};
if(System.ie&&!System.debug)Include("System.Plugins.IE");//IEUserData
if(window.opera)Include("System.Plugins.Opera");//Operasupport
Include("System.Global");
mztreeview2.rar
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
asp.netwebform中获取服务器控件,js脚本获取服务器控件需要使用ClientIDweb前台获取控件:会打印出TextBox1的控件IDjs脚本中获取
1.首先需下载jstree的插件点击打开链接2.在页面引入插件js文件css文件3.初始化控件1)html2)js使用demo2来初始化树形控件$(functi
本文实例讲述了json+jQuery实现的无限级树形菜单效果代码。分享给大家供大家参考。具体如下:这里演示json树形菜单,JS无级树树形菜单,引入了jQuer
PyQt5树形结构控件QTreeWidget简介QTreeWidget类根据预设的模型提供树形显示控件。QTreeWidget使用类似于QListView类的方
本文实例讲述了js实现无限级树形导航列表效果代码。分享给大家供大家参考。具体如下:这是一款js实现无限级树形下拉导航菜单,简洁实用,用到一个已封装好的JS类,有