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;
&
Ïà¹ØÎĵµ£º
ת×Ôhttp://topic.csdn.net/u/20091014/12/44b0ac69-5228-429b-854a-a91e3736f1d4.html?64368
ÿһÏî¶¼ÊÇJSÖеÄС¼¼ÇÉ£¬µ«Ê®·ÖµÄʵÓã¡
1.document.write(”"); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document->html->(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window->(navig ......
javascriptÖдæÔÚ¼¸ÖÖ¶ÔURL×Ö·û´®½øÐбàÂëµÄ·½·¨£ºescape()£¬encodeURI()£¬ÒÔ¼°encodeURIComponent()¡£Õ⼸ÖÖ±àÂëËùÆðµÄ×÷Óø÷²»Ïàͬ¡£
escape() ·½·¨£º
²ÉÓÃISO Latin×Ö·û¼¯¶ÔÖ¸¶¨µÄ×Ö·û´®½øÐбàÂë¡£ËùÓеĿոñ·û¡¢±êµã·ûºÅ¡¢ÌØÊâ×Ö·ûÒÔ¼°ÆäËû·ÇASCII×Ö·û¶¼½«±»×ª»¯³É%xx¸ñʽµÄ×Ö·û±àÂ루xxµÈÓÚ¸Ã×Ö·ûÔÚ×Ö·û¼¯±í ......
1.document.write(""); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document->html->(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window->(navigator,screen,history,location,document)
5.µÃµ½±íµ¥ÖÐÔªËØµÄÃû³ÆºÍÖµ:document.getElementById("±íµ¥ÖÐÔªËØµÄID號").name(»òvalue)
6.Ò»¸öСдת´ ......
±¾ÎÄÀ´×Ô£º
http://articles.sitepoint.com/article/adobe-air-pref-javascript
ÔÚÎÒ Ö®Ç°µÄÌû×ÓÀ ÎÒ¼¤¶¯µØ¿ªÊ¼ÁËÎҵĵÚÒ»¸öAIRÓ¦Ó㬽Ð×öHarpoon, ½öʹÓÃHTML, CSS, ºÍJavaScript¡£ÎÒµ±Ê±Ã»Ê±¼äÌÖÂÛµÄÒ»¸öÌØµã¾ÍÊÇ£¬Äã¿ÉÒÔʹÓÃÒ»¸öXMLÎļþ´æ´¢ºÍ¼ìË÷Ó¦ÓóÌÐòÊ×Ñ¡Ïî¡£
......
¡¡¡¡Ê²Ã´ÊÇJavaScript£¿ÏàÐÅËæ±ã°Ù¶ÈGoogleһ϶¼ÄÜÕÒµ½Ò»´ó¶ÑµÄ¶¨Òå½âÊÍ¡£¶øÔÚÎÒµÄÀí½âÖУ¬JavaScript¾ÍÊÇÒ»ÖÖ¿Í»§¶ËµÄ½Å±¾ÓïÑÔ£¬ÓÃÓÚ´¦ÀíÒ³ÃæÊý¾ÝÂß¼ºÍÓû§ÌåÑé£¨ÍøÒ³ÌØÐ§£©¡£Êµ¼ÊÉÏ£¬JavaScript²¢²»½ö½öÖ»ÄÜÓÃÓÚ¿Í»§¶Ë£¬Ëü»¹ÄÜÓÃÓÚ·þÎñÆ÷¶Ë±à³Ì£¬µäÐ͵ÄÀý×Ó¾ÍÊÇMozilla Rhino¡£Mozilla RhinoÊÇÒ»¸ö´¿JavaµÄ¿ªÔ´µÄJavaSc ......