public interface DOMStringList
| org.w3c.dom.DOMStringList |
DOMStringList接口提供了DOMString值的有序集合的抽象,而不定义或限制如何实现该集合。 DOMStringList中的项目可通过从0开始的整数索引访问。
另见 Document Object Model (DOM) Level 3 Core Specification 。
公共方法(Public methods) |
|
|---|---|
abstract boolean |
contains(String str) 测试字符串是否属于此 |
abstract int |
getLength() 列表中的数量为 |
abstract String |
item(int index) 返回 |
boolean contains (String str)
测试一个字符串是否是这个 DOMStringList一部分。
| 参数(Parameters) | |
|---|---|
str |
String: The string to look for. |
| 返回(Returns) | |
|---|---|
boolean |
true if the string has been found, false otherwise. |
int getLength ()
列表中的数量为DOMString 。 有效子节点索引的范围是0到length-1含)。
| 返回(Returns) | |
|---|---|
int |
|
String item (int index)
返回index第index个项目。 如果index大于或等于列表中的数量DOMString ,则返回null 。
| 参数(Parameters) | |
|---|---|
index |
int: Index into the collection. |
| 返回(Returns) | |
|---|---|
String |
The DOMString at the indexth position in the DOMStringList, or null if that is not a valid index. |