js脚本:js树形Control控件脚本代码

/*---------------------------------------------------------------------------*\
| Subject: JavaScript Framework
| Author: meizz
| Created: 2005-02-27
| Version: 2006-08-11
|-----------------------------------
| MSN:[email protected] QQ:112889082
| http://www.meizz.com Copyright (c) meizz MIT-style license
| The above copyright notice and this permission notice shall be
| d in all copies or substantial portions of the Software
\*---------------------------------------------------------------------------*/
window. = function{this.HashCode;}
.debug=true; //false
._codebase={};
try
{
(window!=parent && parent. && parent.._codebase)
._codebase = parent.._codebase;
("und"!=typeof opener&&opener.&&opener.._codebase)
._codebase = opener.._codebase;
("und"!=typeof dialogArguments && dialogArguments.)
._codebase = dialogArguments.._codebase;
}
catch(ex){}
.MISSING_ARGUMENT="Missing argument";
.ARGUMENT_PARSE_ERROR="The argument cannot be parsed";
.NOT_SUPPORTED_XMLHTTP="Your browser do not support XMLHttp";
.FILE_NOT_FOUND="File not found";
.MISCODING="Maybe file encoding is not ANSI or UTF-8";
.NAMESPACE_ERROR=" nonstandard ";
.hashCounter=0;
.currentVersion="20060811";
var t=document.getElementsByTagName("SCRIPT");
t=(.scriptElement=t[t.length-1]).src.replace(/\\/g, "/");
.incorporate=function(d,s){for(var i in s)d[i]=s[i]; d;};
.path=(t.lastIndexOf("/")<0)?".":t.sub(0, t.lastIndexOf("/"));
.getUniqueId=function{ "mz_"+(.hashCounter).toString(36);};
.toHashCode=function(e)
{
("und"!=typeof e.hashCode) e.hashCode;
e.hashCode=.getUniqueId;
};
.supportsXmlHttp=function
{
"object"typeof(._xmlHttp||(._xmlHttp= XMLHttpRequest));
};
._getPrototype=function(, argu)
{
("und"typeof ._prototypes[]) ;
for(var a=, i=0; i<argu.length; i) a[i]="argu["+ i +"]";
eval(" (._prototypes['"++"'])("+a.join(",")+")");
};
.ie=navigator.userAgent.indexOf("MSIE")>0 && !window.opera;
.ns=navigator.vendor"Netscape";
._alert=function(msg){(.debug)alert(msg);};
._parseResponseText=function(s)
{
(nulls||"\uFFFD"s.charAt(0)){._alert(.MISCODING); "";}
("\xef"s.charAt(0))s=s.substr(3); //for firefox
s.replace(/(^|\n)\s*\/\/+\s*((Using|Import|Include)\((\"|\'))/g,"$1$2");
};
(window.ActiveXObject && (.ie || !window.XMLHttpRequest))
{
window.XMLHttpRequest = function
{
var msxmls=['MSXML3','MSXML2','Microsoft'], ex;
for(var i=0;i<msxmls.length;i)
try{ ActiveXObject(msxmls[i]+'.XMLHTTP')} catch(ex){}
._xmlHttp="mz"; throw Error(.NOT_SUPPORTED_XMLHTTP);
}
}
.load = function(, path)
{
try
{
(.supportsXmlHttp){path=._mapPath(, path);
var x=._xmlHttp; x.open("GET",path,false); x.send(null);
(x.readyState4)
{
(x.status0||/^file\:/i.test(path))
._parseResponseText(x.responseText);
(x.status200) ._parseResponseText(x.responseText);
(x.status404)._alert(+"\n"+.FILE_NOT_FOUND);
throw Error(x.status +": "+ x.statusText);}
} ._alert(.NOT_SUPPORTED_XMLHTTP);
}
catch(ex){._alert(+"\n"+ex.message);} "";
};
._eval = function(, path)
{
//alert("._eval(\""++"\")=\r\n"+._codebase[]);
try{(window.execScript)window.execScript(._codebase[]);
{
var script=document.createElement("SCRIPT");script.type="text/javascript";
script.innerHTML="eval(._codebase['"+ +"']);";
document.getElementsByTagName("HEAD")[0].appendChild(script);
Timeout(function{script.parentNode.removeChild(script)},99);
}}catch(ex){._alert("Syntax error _disibledevent=_blank>mztreeview2.rar
Tags:  浏览器不支持js脚本 js时间控件 js日期控件 js脚本

延伸阅读

最新评论

发表评论