Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScriptÊ÷

 
/** ÅäÖòÎÊý */
function TreeConfig() {
    this.showIco = true;
    this.showCheckBox = false;
    this.checkBoxName = "_TREE_CHECKBOX_";
    this.checkBoxRelated = false;
}
/**
* ½ÚµãÀà
* ½ÚµãĿǰĬÈÏÖ§³ÖµÄÊôÐÔÓÐ:
* text, url, target, cb, cbname, cbchecked, cbval, ico, icoFile, icoOpen
*/
function Node(id, parentId, attributes) {
    this.id         = id;  // ½Úµã×ÔÉíid
    this.parent     = parentId   || ""; // ¸¸id
    this.attributes = attributes || {}; // ½ÚµãÊôÐÔ
    this._created  = false;
    this._expanded = false;
    this._checked  = false;
}
// µÃµ½½ÚµãÊôÐÔ
Node.prototype.getAttribute = function(key) {
    var attr = this.attributes[key];
    return (attr==undefined || attr=="")? null : attr;
}
// µÃµ½½ÚµãÊôÐÔ
Node.prototype.setAttribute = function(key, value) {
    this.attributes[key] = value;
}
/** Ê÷Àà */
function TissonTree(instanceName, config) {
    this.instanceName = instanceName || "tree";  // ʵÀýÃû
    this.nodes = {};     // ËùÓнڵ㼯
    this.nodeArray = null; // °üº¬ËùÓнڵãµÄÊý×é
    this.nodeLink = {};  // ¸¸-×Ó½Úµã¶ÔÓ¦¹ØÏµ¼¯
    this.rootId = "-1";  // ĬÈϸù½Úµãid
    this._baseImagesPath = "/SmtCCS_tkms/images/tree/"; // ͼƬµÄ»ù±¾Â·¾¶
    this._checkedNodes = {};
    this.selectedNode = null;
    this.selectedNodeId = "";
    this.nextSearchIndex = 0;
    this.searchText = "";
    this.treeStage = null;
   &


Ïà¹ØÎĵµ£º

javascript»ù´¡ÖªÊ¶

javascript£º»ù´¡ÖªÊ¶
1 ´´½¨½Å±¾¿é
1: <script language=”javascript”>
2: javascript code goes here
3: </script>
2 Òþ²Ø½Å±¾´úÂë
1: <script language=”javascript”>
2: <!--
3: document.write(“Hello”);
4: // -->
5: </script>
ÔÚ ......

javascript Êý×é

 optionsÊý×é
¡¡¡¡¸ÃÊý×éÊÇselect¶ÔÏóµÄÒ»¸öÊôÐÔ,¼´Ñ¡Ôñ¿òÖеÄËùÓÐÑ¡Ïî(<OPTION>)µÄÒ»¸öÁÐ±í¡£
¡¡¡¡ÊôÐÔ
¡¡¡¡defaultSelected Ñ¡ÏîÁбíÖеÄȱʡѡÏî
¡¡¡¡index Ñ¡ÏîÁбíÖÐijѡÏîµÄË÷ÒýλÖÃ
¡¡¡¡length Ñ¡ÏîÁбíÖеÄÑ¡ÏîÊý(<OPTIONS>)
¡¡¡¡name Ñ¡ÏîÁбíµÄÃû×Ö(NAMEÌØÐÔ)
¡¡¡¡selected ±íÊ¾Ñ ......

¿ú̽jQuery——ÃæÏò¹Ç»ÒJavaScript³ÌÐòÔ±

µ± jQuery ÔÚ2006Äê1ÔÂÏÖÉíʱ£¬¸øÎҵĵÚÒ»Ó¡Ïó£¬ÊÇÕâÍæÒâ¶ù¹¹ÔìµÃºÜ¾«Ã÷¡£»ùÓÚCSSÑ¡ÔñÆ÷£¨CSS selectors£©À´´òµãÒ»ÇУ¬Æä˼·Ï൱ÁéÇÉ£¨²Î¿¼getElementsBySelector£©¡£µ«Á´ºÐ¹¤Ê£¨chaining stuff£©¿´ÆðÀ´¸üÏñ¸öàåÍ·£¬²¢ÇÒÕûÌå¿´À´£¬jQuery¿âÌṩµÄ¹¦Äܲ¢²»Äܸ²¸ÇËùÓлù´¡ÐԵĶ«Î÷¡£Òò´ËÎҶ϶¨£¬jQueryÖ»»áê¼»¨Ò»ÏÖ¡£
¼¸¸ö ......

10ÖÖAJAX/JavaScriptÌØÐ§ÊµÀýÈÃÄãµÄÍøÕ¾¸üÎüÒýÈË

 ½ñÌìµÄ»°ÌâÊÇÈçºÎ¸Ä½ø×Ô¼ºÍøÕ¾µÄ½çÃæ»òÌá¸ßÍøÕ¾µÄÊÓ¾õÌåÑ飬´Ó¶øÈÃÓû§¼ÇÒäÓÌС£
¡¡¡¡ÎÒÃÇÓÐÈýÖÖÖ÷ÒªµÄ·½·¨(´ÓÄѵ½Ò×):×Ô¼º¶¯ÊÖд½Å±¾;ʹÓÃÀàËÆÓÚjQueryºÍmooToolsµÄJavaScript¿ò¼Ü(¿ÉÒÔÈñàд´úÂë±äµÃ¸üÈÝÒ×Щ);ʹÓÃÄܹ¤×÷ÓÚÏÖÓеÄJavaScript¿ò¼ÜϵÄÌáǰԤÖúõĽű¾»òÄÇÖÖ´ÓÍ·¿ªÊ¼¿ª·¢µÄ´´½¨Õß¡£ÕâÆªÎÄÕÂÊʺÏÄÇ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ