HBCMS更多的中文手册参考:

length参数属性

DHTML文档教程

Retrieves the number of characters in a textnode object.

dhtml语法

[ ilength = ] textnode.length

dhtml可能的值

iLengthInteger that receives the number of characters.

The property is read-only. The property has no default value.

DHTML代码范例

This example uses the length property to specify where a TextNode is split using the splittext method.

<SCRIPT>
function fnChangeValue(){
var oListItem = document.createElement("LI");
oList.appendChild(oListItem);
var oNode = oList.firstChild.childNodes(0);
var oTextNode = oList.firstChild.childNodes(0);
var oSplit = oTextNode.splitText(oTextNode.length/2);
oListItem.appendChild(oSplit);
}
</SCRIPT>
<UL ID = oList onclick = "fnChangeValue()">
<LI>Start Here
</UL>

是否符合公共标准

This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

TextNode