JavaScript技巧(下)

来源:百度文库 编辑:神马文学网 时间:2024/04/25 15:47:41

用javascript进行拖拽

第 1 页 怎么用javascript进行拖拽 [1]
第 2 页 怎么用javascript进行拖拽 [2]
第 3 页 怎么用javascript进行拖拽 [3]
第 4 页 怎么用javascript进行拖拽 [4]
第 5 页 怎么用javascript进行拖拽 [5] 

一个表格特效的JS代码(收藏)

Posted on 2007-03-22 14:58 Jaunt 阅读(521) 评论(0)  编辑  收藏 所属分类: JavaScript

嘿嘿……今天看到很好用的一个js表格效果,有时间研究下^_^



mytable



 
 
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
HTML document object properties
activeElementRetrieves the object that has the focus.
aLinkColorSets or retrieves the color of all links in the document.
bgColorSets or retrieves the background color behe document object.
bodySpecifies the beginning and end of the document body.
contentEditableSets or retrieves whether the userdocument object.
cookieSets or retrieves the string value of a cookie.
defaultCharsetSets or retrieves the default chara of the document.
designModeSets or retrieves whether the document can be edited.
documentElementRetrieves a reference to the root node of the document.
domainSets or retrieves the security domain of the document.

 

 

 

自动对select表单列表进行排序(收藏)

Posted on 2007-03-22 15:55 Jaunt 阅读(194) 评论(0)  编辑  收藏 所属分类: JavaScript 自动对select表单列表进行排序

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
http://www.w3.org/1999/xhtml">

runcode









主要有以下几点总结:
1,select控件本身支持字母索引。比如select控件处于焦点中的时候,按B键,option中相应的以B开头的选项就会显示出来。

2,这段代码写的较好!这段代码的作用是一项一项赋值select空间列表内容赋给另一个数组。
var t=[],tt=o.options;
  while (tt.length>0){
    t[t.length]=tt[0].text;
    tt.remove(0);
  }
首先定义数组t=[],用于存储原select控件列表内容。
tt=o.options;读取select空间内容,以数组形式存储在tt数组中。
t[t.length]=tt[0].text;这里时一个技巧,因为t.length总是比当前t的最大索引大1,所以这样写数组t可以自动增加空间。tt[0].text这里每次都读取第一个内容,然后用tt.remove(0);删除第一项内容,直至读取完毕。

3,这段代码对新数组内容按字母派讯,然后写入原select空间列表。
t.sort();
  for (var i=0,c;c=t[i];i++){
    tt.add(new Option(c));
  }

JS检验密码安全性等级(收藏)

Posted on 2007-03-22 14:16 Jaunt 阅读(234) 评论(0)  编辑  收藏 所属分类: JavaScript   JS检验密码安全性等级:(首先声明,本文非我原作)
 
   
   

   
   
   
   
   
   
   
   
   
   
   
   
校验密码安全性
请输入密码:
安全性等级:
   
   
   
   
   
   
建议至少 6 个字符. 请使用强密码以保证安全.