易截截图软件、单文件、免安装、纯绿色、仅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;
   &


相关文档:

JS通用表单验证函数,基于javascript正则表达式

 表单的验证在实际的开发当中是件很烦琐又无趣的事情
今天在做一个小项目的时候,需要JS验证,寻找到一个比较好的东西
地址如下:
http://blog.csdn.net/goodfunman/archive/2005/10/21/513338.aspx
http://blog.csdn.net/yhl_621/archive/2006/03/04/615273.aspx
http://blog.csdn.net/NetDreamwing/archive/2004/1 ......

javascript 获取URL参数

function getQueryString(queryStringName)
{
 var returnValue="";
 var URLString=new String(document.location);
 var serachLocation=-1;
 var queryStringLength=queryStringName.length;
 do
 {
  serachLocation=URLString.indexOf(queryStringName+"\=");
  if ......

窥探jQuery——面向骨灰JavaScript程序员

当 jQuery 在2006年1月现身时,给我的第一印象,是这玩意儿构造得很精明。基于CSS选择器(CSS selectors)来打点一切,其思路相当灵巧(参考getElementsBySelector)。但链盒工事(chaining stuff)看起来更像个噱头,并且整体看来,jQuery库提供的功能并不能覆盖所有基础性的东西。因此我断定,jQuery只会昙花一现。
几个 ......

怎样使用JavaScript存储Adobe AIR应用程序首选项

 本文来自:
http://articles.sitepoint.com/article/adobe-air-pref-javascript
 
在我 之前的帖子里,  我激动地开始了我的第一个AIR应用,叫做Harpoon, 仅使用HTML, CSS, 和JavaScript。我当时没时间讨论的一个特点就是,你可以使用一个XML文件存储和检索应用程序首选项。
......

[从jQuery看JavaScript]

  学习jQuery已经有半年时间了。在实际应用中,基础函数已经算是得心应手了。但是,对于我自己来说,还存在一个软肋——知其然而不知其所以然。而因为前面项目的压力等各方面的问题,我一直没有时间对此作补救的措施。
  现在终于决定要离职了,我又再次成为自己时间的真正主人。一直想做而没法做的事都要在 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号