to hiller:利用脚本控制表格单元的内容(原创)

作者:简简单单 2008-01-18
现在终于找到相关资料,做完了例子这个发现MSDN中也有一个类似的例子,呵呵!!







    
    
    
    





解释:
rows和cells在Table中分别代表着行和列的集合,在TABLE中的范围限于THEAD, TBODY, TFOOT。
使用方法:obj.rows(index)
    obj.cells(index)
其中index是可选的,可以选择一个整数索引也可以选择一个字符串作为索引。
整数索引是基于0开始的,也就是说基和中的第一个元素的下标是0。
字符串索引必须是一个有效的至少存在于页面中的一个具有标示的元素名称。
我不知道翻译的是否正确,下面附上MSDN中的原文:
Optional. An integer or a string specifying the index value of the element to retrieve. Integer indexes are zero-based, meaning the first element in the collection has index 0. A string index is valid only if the string is an identifier of at least one element in the document.

相关文章

精彩推荐