js树形控件脚本代码_javascript技巧
/*---------------------------------------------------------------------------*\
| Subject: JavaScript Framework
| Author: meizz
| Created: 2005-02-27
| Version: 2006-08-11
|-----------------------------------
| MSN:huangfr@msn.com QQ:112889082
| http://www.meizz.com Copyright (c) meizz MIT-style license
| The above copyright notice and this permission notice shall be
| included in all copies or substantial portions of the Software
\*---------------------------------------------------------------------------*/
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;
else if ("undefined"!=typeof opener&&opener.System&&opener.System._codebase)
System._codebase = opener.System._codebase;
else if ("undefined"!=typeof dialogArguments && dialogArguments.System)
System._codebase = dialogArguments.System._codebase;
}
catch(ex){}
System.MISSING_ARGUMENT="Missing argument";
System.ARGUMENT_PARSE_ERROR="The argument cannot be parsed";
System.NOT_SUPPORTED_XMLHTTP="Your browser do not support XMLHttp";
System.FILE_NOT_FOUND="File not found";
System.MISCODING="Maybe file encoding is not ANSI or UTF-8";
System.NAMESPACE_ERROR=" nonstandard namespace";
System.hashCounter=0;
System.currentVersion="20060811";
var t=document.getElementsByTagName("SCRIPT");
t=(System.scriptElement=t[t.length-1]).src.replace(/\\/g, "/");
System.incorporate=function(d,s){for(var i in s)d[i]=s[i];return d;};
System.path=(t.lastIndexOf("/")System.getUniqueId=function(){return "mz_"+(System.hashCounter++).toString(36);};
System.toHashCode=function(e)
{
if("undefined"!=typeof e.hashCode) return e.hashCode;
return e.hashCode=System.getUniqueId();
};
System.supportsXmlHttp=function()
{
return "object"==typeof(System._xmlHttp||(System._xmlHttp=new XMLHttpRequest()));
};
System._getPrototype=function(namespace, argu)
{
if("undefined"==typeof System._prototypes[namespace])return new System();
for(var a=[], i=0; i
};
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); //for firefox
return s.replace(/(^|\n)\s*\/\/+\s*((Using|Import|Include)\((\"|\'))/g,"$1$2");
};
if(window.ActiveXObject && (System.ie || !window.XMLHttpRequest))
{
window.XMLHttpRequest = function()
{
var msxmls=['MSXML3','MSXML2','Microsoft'], ex;
for(var i=0;i
System._xmlHttp="mz"; throw new Error(System.NOT_SUPPORTED_XMLHTTP);
}
}
System.load = function(namespace, path)
{
try
{
if(System.supportsXmlHttp()){path=System._mapPath(namespace, path);
var x=System._xmlHttp; x.open("GET",path,false); x.send(null);
if (x.readyState==4)
{
if(x.status==0||/^file\:/i.test(path))
return System._parseResponseText(x.responseText);
else if(x.status==200)return System._parseResponseText(x.responseText);
else if(x.status==404)System._alert(namespace+"\n"+System.FILE_NOT_FOUND);
else throw new Error(x.status +": "+ x.statusText);}
} else System._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
{
var script=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("Syntax error on load "+ namespace);}
System._existences[namespace]=System._mapPath(namespace, path);
};
System._exist = function(namespace, path)
{
if("undefined"==typeof System._existences[namespace]) return false;
return System._existences[namespace]==System._mapPath(namespace,path);
};
System._mapPath = function(namespace, path)
{
if("string"==typeof path && path.length>3)return path.toLowerCase();
var p=(System.path+"/"+namespace.replace(/\./g,"/")+".js").toLowerCase();
return p +(("undefined"==typeof path||path) ? "" : "?t="+ Math.random());
};
window.Using = function(namespace, path, rename)
{
if(System._exist(namespace, path)){
var s=window[namespace.substr(namespace.lastIndexOf(".")+1)];
if(s!=System._prototypes[namespace])s=System._prototypes[namespace];return}
var code=namespace +"."; if(!/((^|\.)[\w\$]+)+$/.test(namespace))
throw new Error(namespace+System.NAMESPACE_ERROR);
for(var i=code.indexOf("."); i>-1; i=code.indexOf(".", i+1)){
var e= code.substring(0,i), s=(e.indexOf(".")==-1) ? "window[\""+e+"\"]":e;
if(e&&"undefined"==typeof(s)){
eval(s+"=function(){return System._getPrototype(\""+e+"\", arguments)}");}}
if("undefined"==typeof path &&"string"==typeof System._codebase[namespace])
{
System._eval(namespace, path);}else{if(code=System.load(namespace,path)){
e = "$"+ System.getUniqueId() +"__id"+ new Date().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){return System._instances[hashCode]};
window.Include=function(namespace, path)
{
if(System._exist(namespace, path)) return;
var code;if(!/((^|\.)[\w\$]+)+$/.test(namespace))
throw new Error(namespace + System.NAMESPACE_ERROR);
if("undefined"==typeof path&&"string"==typeof(System._codebase[namespace]))
{
System._eval(namespace, path);}else if(System.supportsXmlHttp()){
if(code=System.load(namespace, path)){System._codebase[namespace]=code;
System._eval(namespace, path);}}else{
var script=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)
{
var capital=name.charAt(0).toUpperCase()+name.substr(1);
r_w=r_w||Function.READ_WRITE; name="_"+name; var p=this.prototype;
if("undefined"!=typeof initValue) p[name]=initValue;
if(r_w&Function.READ) p["get"+ capital]=function(){return this[name];};
if(r_w&Function.WRITE) p["set"+ capital]=function(v){this[name]=v;};
};
Function.prototype.Extends=function(SuperClass,ClassName)
{
var op=this.prototype, i, p=this.prototype=new SuperClass();
if(ClassName)p._className=ClassName; for(i in op)p[i]=op[i];
if(p.hashCode)delete System._instances[p.hashCode];return p;
};
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(){var t;if(t=this.hashCode)delete System._instances[t]};
t.addEventListeners=function(type, handle)
{
if("function"!=typeof handle)
throw new Error(this+" addEventListener: "+handle+" is not a function");
if(!this._listeners) this._listeners={};
var id=System.toHashCode(handle), t=this._listeners;
if("object"!=typeof t[type]) t[type]={}; t[type][id]=handle;
};
t.removeEventListener=function(type, handle)
{
if(!this._listeners)this._listeners={}; var t=this._listeners;
if(!t[type]) return; var id=System.toHashCode(handle);
if( t[type][id])delete t[type][id];if(t[type])delete t[type];
};
t.dispatchEvent=function(evt)
{
if(!this._listeners)this._listeners={};
var i, t =this._listeners, p =evt.type;
evt.target=evt.srcElement=this; if(this[p])this[p](evt);
if("object"==typeof t[p]) for(i in t[p]) t[p][i].call(this,evt);
delete evt.target; delete evt.srcElement;return evt.returnValue;
};
t.setHashCode=function()
{
System._instances[(this.hashCode=System.getUniqueId())]=this;
};
t.getHashCode=function()
{
if(!this.hashCode)this.setHashCode(); return this.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"); //IE UserData
if(window.opera) Include("System.Plugins.Opera"); //Opera support
Include("System.Global");mztreeview2.rar

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

如何使用JS和百度地圖實現地圖平移功能百度地圖是一款廣泛使用的地圖服務平台,在Web開發中經常用於展示地理資訊、定位等功能。本文將介紹如何使用JS和百度地圖API實作地圖平移功能,並提供具體的程式碼範例。一、準備工作使用百度地圖API前,首先需要在百度地圖開放平台(http://lbsyun.baidu.com/)上申請一個開發者帳號,並建立一個應用程式。創建完成

人臉偵測辨識技術已經是一個比較成熟且應用廣泛的技術。而目前最廣泛的網路應用語言非JS莫屬,在Web前端實現人臉偵測辨識相比後端的人臉辨識有優勢也有弱勢。優點包括減少網路互動、即時識別,大大縮短了使用者等待時間,提高了使用者體驗;弱勢是:受到模型大小限制,其中準確率也有限。如何在web端使用js實現人臉偵測呢?為了實現Web端人臉識別,需要熟悉相關的程式語言和技術,如JavaScript、HTML、CSS、WebRTC等。同時也需要掌握相關的電腦視覺和人工智慧技術。值得注意的是,由於Web端的計

如何使用PHP和JS創建股票蠟燭圖股票蠟燭圖是股票市場中常見的技術分析圖形,透過繪製股票的開盤價、收盤價、最高價和最低價等數據,幫助投資者更直觀地了解股票的價格波動情形。本文將教你如何使用PHP和JS創建股票蠟燭圖,並附上具體的程式碼範例。一、準備工作在開始之前,我們需要準備以下環境:1.一台運行PHP的伺服器2.一個支援HTML5和Canvas的瀏覽器3

股票分析必備工具:學習PHP和JS繪製蠟燭圖的步驟,需要具體程式碼範例隨著網路和科技的快速發展,股票交易已成為許多投資者的重要途徑之一。而股票分析是投資人決策的重要一環,其中蠟燭圖被廣泛應用於技術分析。學習如何使用PHP和JS繪製蠟燭圖將為投資者提供更多直觀的信息,幫助他們更好地做出決策。蠟燭圖是一種以蠟燭形狀來展示股票價格的技術圖表。它展示了股票價格的

如何使用JS和百度地圖實現地圖點擊事件處理功能概述:在網路開發中,經常需要使用地圖功能來展示地理位置和地理資訊。而地圖上的點擊事件處理是地圖功能中常用且重要的一環。本文將介紹如何使用JS和百度地圖API來實現地圖的點擊事件處理功能,並給出具體的程式碼範例。步驟:匯入百度地圖的API檔案首先,要在HTML檔案中匯入百度地圖API的文件,可以透過以下程式碼實現:

如何使用JS和百度地圖實現地圖熱力圖功能簡介:隨著互聯網和行動裝置的快速發展,地圖成為了普遍的應用場景。而熱力圖作為一種視覺化的展示方式,能夠幫助我們更直觀地了解數據的分佈。本文將介紹如何使用JS和百度地圖API來實現地圖熱力圖的功能,並提供具體的程式碼範例。準備工作:在開始之前,你需要準備以下事項:一個百度開發者帳號,並建立一個應用,取得到對應的AP

隨著網路金融的快速發展,股票投資已經成為了越來越多人的選擇。而在股票交易中,蠟燭圖是常用的技術分析方法,它能夠顯示股票價格的變動趨勢,幫助投資人做出更精準的決策。本文將透過介紹PHP和JS的開發技巧,帶領讀者了解如何繪製股票蠟燭圖,並提供具體的程式碼範例。一、了解股票蠟燭圖在介紹如何繪製股票蠟燭圖之前,我們首先需要先了解什麼是蠟燭圖。蠟燭圖是由日本人

js和vue的關係:1、JS作為Web開發基石;2、Vue.js作為前端框架的崛起;3、JS與Vue的互補關係;4、JS與Vue的實踐應用。
