w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: DOM Input Hidden¶ÔÏó
The Hidden object represents a hidden field in an HTML form. For each instance of an <input type="hidden"> tag in an HTML form, a Hidden object is created.
µ±HTML±íµ¥ÖгöÏÖ<input type="hidden">±êÇ©¾ÍÒâζ×ÅHidden¶ÔÏó½¨Á¢ÆðÀ´ÁË
You can access a Hidden object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().
Äã¿ÉÒÔ¸ù¾Ý±íµ¥Ê¹ÓÃÔªËØÊý×éË÷Òý(Êý×Ö»òÊÇÃû³Æ)»òÕßʹÓÃgetElementById()À´·ÃÎÊHidden¶ÔÏó¡£
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
| Property ÊôÐÔ |
Description ÃèÊö |
IE | F | N | W3C |
|---|---|---|---|---|---|
| defaultValue | Sets or returns the initial value of the hidden field ÉèÖûò·µ»Øhidden fieldµÄ³õʼֵ |
3 | 1 | 2 | Yes |
| form | Returns a reference to the hidden field's parent form ·µ»Øhidden field¸¸±íµ¥µÄ²Î¿¼ |
3 | 1 | 2 | Yes |
| id | Sets or returns the id of the hidden field (In IE 4 this property is read-only) ÉèÖûò·µ»Øhidden fieldµÄid |
4 | 1 | No | |
| name | Sets or returns the name of the hidden field ÉèÖûò·µ»Øhidden fieldµÄname |
3 | 1 | 2 | Yes |
| type | Returns the type of the form element. For a hidden object it will always be "hidden" ·µ»Ø±íµ¥ÀïµÄÔªËØÀàÐÍ¡£hidden¶ÔÏó¾ÍÏÔʾ"hidden" |
4 | 1 | 3 | Yes |
| value | Sets or returns the value of the value attribute of the hidden field ÉèÖûò·µ»Øhidden fieldµÄvalueÊôÐÔÖµ |
3 | 1 | 2 | Yes |
ÆÀÂÛ (0)
All