最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

getElementsByName Method

Internet Development Index

Retrieves a collection of objects based on the value of the NAME attribute.

Syntax

collObjects = document.getElementsByName(sNameValue)

Parameters

sNameValue Required. String爐hat specifies the value of a NAME attribute.

Return Value

Returns a collection of objects with the same NAME attribute value.

Remarks

When you use the getElementsByName method, all elements in the document that have the specified NAME or ID attribute value are returned.

Elements that support both the NAME and the ID attribute are included in the collection returned by the getElementsByName method, but not elements with a NAME?A HREF="../properties/expando.html">expando.

Example

This example uses the getElementsByName method to return a collection of input type=text elements with the specified NAME attribute value, firstName.

<SCRIPT>
function fnGetNames(){
// Returns a collection with 2 INPUT type=text elements.
var aInput=document.getElementsByName("firstName");
}
</SCRIPT>
<INPUT TYPE="text" NAME="firstName">
<INPUT TYPE="text" NAME="firstName">
<INPUT TYPE="button" VALUE="Get Names" onclick="fnGetNames()">

Standards Information

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

Applies To

document

See Also

About the W3C Document Object Model
武功县| 北碚区| 广昌县| 和田市| 广元市| 栾城县| 攀枝花市| 宁陕县| 吴桥县| 游戏| 蒙自县| 扶余县| 娄底市| 临汾市| 金塔县| 九龙坡区| 九台市| 西华县| 赣榆县| 固始县| 贞丰县| 盐山县| 南康市| 同心县| 察雅县| 城口县| 济宁市| 张家界市| 罗田县| 宜城市| 沈丘县| 肇东市| 湄潭县| 中牟县| 承德县| 汝阳县| 苍梧县| 建德市| 马龙县| 榆林市| 辽宁省|