×î½üÕæµÄÊǺÜ棬ÕâƪÔçÒÑÓÐÁ˹¹Ë¼¿ÉÊÇһֱûʱ¼äÍê³É£¬½ñÌìץסһµãµã¿ÕÏÐ×ܽáÒ»µã¶«Î÷°É¡£
1.ÏÈ˵¼¸¸ö»ù±¾ÀàÐÍ£º DOMString£¬ boolean£¬ long£¬ unsigned long£¬ double£¬
1.ÏÈ˵¼¸¸ö»ù±¾ÀàÐÍ£º DOMString£¬ boolean£¬ long£¬ unsigned long£¬ double£¬
NaN£¨Not-a-Number£©¡£
DOMStringÆäʵ¾ÍÊÇÆäËü´ó¼Ò³£ÓõÄÓïÑÔÖеÄstring¡£ ÔÚHTML5ÖУ¬ËüÓÃÓÚ±íʾurl£¬DomÄÚÈÝ
µÈµÈ¡£ÆäËûµÄboolean£¨²¼¶û£©£¬ long£¨³¤ÕûÐÍ£©£¬ unsigned long£¨ÎÞ·ûºÅ³¤ÕûÐÍ£©£¬ double£¨
¸¡µãÊý£©ÎÒÏë²»ÓÃÎÒÏêÊö£¬´ó¼Ò¶¼ÄÜÇå³þ¡£ÖÁÓÚNaNÎÒÏë´ó²¿·ÖJSÀÏÄñÒ²¶¼Çå³þÆäÒâÒ壬¾ÍÊÇÔÚÒ»¸öÎÞÇî´ó
»òÕß·ÇÊý×ÖµÄÖµ¡£
¹Ù·½ÎĵµÀïûÓнéÉÜundefinedºÍnull£¬ÖÁÓÚΪʲô£¬Ï£ÍûÄÜÓиßÊÖ¸øÓè½â´ð~~
¹Ù·½ÎĵµÀïûÓнéÉÜundefinedºÍnull£¬ÖÁÓÚΪʲô£¬Ï£ÍûÄÜÓиßÊÖ¸øÓè½â´ð~~
2. ¼¯ºÏÀàÐÍ°üÀ¨£º HTMLCollection, HTMLAllCollection,
HTMLFormControlsCollection, HTMLOptionsCollection, and
HTMLPropertiesCollection¡£
HTMLCollectionÊÇÒ»¸ö·ºÐͼ¯ºÏ£¬Ò²ÊÇÒ»¸ö¼¯ºÏµÄ»ù´¡½Ó¿Ú£¬ËüÌṩÁËÈý¸öattributes£º
length£¬ item£¬ namedItem.
lengthÊǼ¯ºÏµÄ³¤¶È¡£
item£¨index£©¿ÉÒÔÓÃË÷ÒýÖµ»ñÈ¡¼¯ºÏÖеÄÔªËØ¡£
namedItem£¨name£©¿ÉÒÔÓÃÔªËصÄname»ñÈ¡ÔªËØ¡£
ʵ¼ÊÉÏÄãÒ²¿ÉÒÔÖ±½ÓÓÃcollection[index]£¬collection£¨index£©»òcollection
lengthÊǼ¯ºÏµÄ³¤¶È¡£
item£¨index£©¿ÉÒÔÓÃË÷ÒýÖµ»ñÈ¡¼¯ºÏÖеÄÔªËØ¡£
namedItem£¨name£©¿ÉÒÔÓÃÔªËصÄname»ñÈ¡ÔªËØ¡£
ʵ¼ÊÉÏÄãÒ²¿ÉÒÔÖ±½ÓÓÃcollection[index]£¬collection£¨index£©»òcollection
[name]£¬collection£¨name£©»ñÈ¡¼¯ºÏÖеÄÔªËØ¡£
HTMLAllCollection¼Ì³Ð×ÔHTMLCollection½Ó¿Ú£¬Ëû°üº¬ÒÔÏÂÊôÐÔ£º
lengthºÍitemÊôÐÔ¸úHTMLCollectionµÄÒ»Ñù¡£
namedItem£¨name£©Çø±ðÓÚHTMLCollectionµÄÊÇËüÓпÉÄÜ·µ»ØµÄÊÇÒ»¸ö¼¯ºÏ¡£
tags£¨tagname£©ÓÃtagname·µ»ØÒ»¸ö¼¯ºÏ¡£
ͬÑùÄãÒ²¿ÉÒÔÖ±½ÓÓÃcollection[index]£¬collection£¨index£©»òcollection
lengthºÍitemÊôÐÔ¸úHTMLCollectionµÄÒ»Ñù¡£
namedItem£¨name£©Çø±ðÓÚHTMLCollectionµÄÊÇËüÓпÉÄÜ·µ»ØµÄÊÇÒ»¸ö¼¯ºÏ¡£
tags£¨tagname£©ÓÃtagname·µ»ØÒ»¸ö¼¯ºÏ¡£
ͬÑùÄãÒ²¿ÉÒÔÖ±½ÓÓÃcollection[index]£¬collection£¨index£©»òcollection
[name]£¬collection£¨name£©»ñÈ¡¼¯ºÏÖеÄÔªËØ£¬µ±ÄÇôֵƥÅä¶à¸öÔªËØʱ·µ»ØÒ»¸ö
HTMLAllCollection¡£
HTMLFormControlsCollectionÊÇÒ»¸öÒÔformºÍfieldsetΪԪËصļ¯ºÏ¡£Í¬Ñù¼Ì³Ð×Ô
HTMLCollection½Ó¿Ú¡£
ÓÐHTMLCollectionµÄËùÓÐÊôÐÔ£¬²¢ÁíÍâÔö¼ÓÁËRadioNodeList½Ó¿Ú¡£Ëü¼Ì³Ð×ÔNodeList¡£
ÆäʵRadioNodeList°´¶¨ÒåÉÏÀ´Ëµ¾ÍÊÇÒ»¸öRadiobuttonµÄ¼¯ºÏ¡£ÎұȽϺÃÆæÕâÑùÒ»¸ölist·Å
ÓÐHTMLCollectionµÄËùÓÐÊôÐÔ£¬²¢ÁíÍâÔö¼ÓÁËRadioNodeList½Ó¿Ú¡£Ëü¼Ì³Ð×ÔNodeList¡£
ÆäʵRadioNodeList°´¶¨ÒåÉÏÀ´Ëµ¾ÍÊÇÒ»¸öRadiobuttonµÄ¼¯ºÏ¡£ÎұȽϺÃÆæÕâÑùÒ»¸ölist·Å
ÔÚHTMLFormControlsCollectionÀïµÄÓÃÒâ¡£
HTMLOptionsCollectionÊÇÒ»¸öoptionµÄ¼¯ºÏ£¬¼Ì³Ð×ÔHTMLCollection½Ó¿Ú£¬ËüÒ»°ãÓÃ
ÓÚ²Ù×Ýselect±êÇ©µÄ×ÓÔªËØ¡£
HTMLOptionsCollectionÌØÓеÄÊôÐÔÓУºadd£¨option£©£¬remove£¨index£©£¬selectedIndex
add·½·¨ÓÐÁ½¸öÖØÔØ
void add(in HTMLElement element, in optional HTMLElement before);
void add(in HTMLElement element, in long before);
HTMLOptionsCollectionÌØÓеÄÊôÐÔÓУºadd£¨option£©£¬remove£¨index£©£¬selectedIndex
add·½·¨ÓÐÁ½¸öÖØÔØ
void add(in HTMLElement element, in optional HTMLElement before);
void add(in HTMLElement element, in long before);
Ôö¼ÓÒ»¸öÔªËصÚÒ»²ÎÊý±ØÐ룬ºóÃæµÄ²ÎÊýÊÇ¿ÉÑ¡µÄ
remove£¨index£©ÒÔË÷Òýɾ³ýÒ»¸öÔªËØ¡£
selectedIndexÏàÐÅ´ó¼Ò¶¼ÄÜÃ÷°×¡£
½ñÌìʱ¼ä²»¶à£¬ÏȽéÉܵ½ÕâÀï¡£ÓÐʱ¼äÎÒ»á¼ÌÐø¸üРremove£¨index£©ÒÔË÷Òýɾ³ýÒ»¸öÔªËØ¡£
selectedIndexÏàÐÅ´ó¼Ò¶¼ÄÜÃ÷°×¡£
ÍƼöÐÅÏ¢
- CSS²¼¾ÖµÄ8¸öÄãÐèÒªÕÆÎյļ¼ÇÉ
- IE6¡¢IE7 ¡¢IE8¡¢FFµÄCSSHack
- ̽¾¿cssÖи÷ÖÖÇé¿öϵÄÔªËصĴ¹Ö±ºÍˮƽ¾ÓÖеÄÎÊÌâ
- YahooÍŶӾÑ飺ÍøÕ¾ÐÔÄÜÓÅ»¯µÄ34Ìõ»Æ½ð·¨Ôò(ת)
- HTMLÖÐÀûÓÃ404½«ÀÏÓòÃûÖض¨Ïòµ½ÐÂÓòÃû
- ÈÃdiv¸¡ÓÚselectÖ®ÉÏ
- ¼¸Æª¹ØÓÚºÐ×ÓÄ£Ð͵ÄÎÄÕ£¬ÈÕºó·½±ã¼ìË÷£º
- Css ÑùʽʹÓþÑé×ܽá
- display:inline-blockµÄÉîÈëÀí½â
- ÈçºÎÔÚÍøÒ³ÖÐǶÈëÌØÊâ×ÖÌå
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- ´ó±¥ÑÛ¸£ 7¿îÀàÐ͸÷ÒìµÄCSS3ʵÓò˵¥
- div+css¶àä¯ÀÀÆ÷²âÊÔ·½·¨
- cssËõд¸øÍøÕ¾¼ÓËÙ£¬ÆäʵºÜ¶àʱºò¶¼»áÓõ½
- ´¿CSS´òÔìBubbleÆøÅÝÌáʾ¿ò
- CSSʵÏÖͼƬ°´±ÈÀýËõ·Å
- CSS¼¼ÇÉÈÃÄãµÄÍøÕ¾¸üÉÏÒ»²ãÂ¥
- ¹Ì¶¨¸ß¶Èdiv,ËæÄÚÈÝ×Ô¶¯±ä¸ßcss¶¨Òå·½·¨
- web¼æÈݸ÷¸öä¯ÀÀÆ÷×îС¸ß¶ÈµÄд·¨
- CSS£¬Ç³ÎöpositionÖÐRelativeºÍAbsolute
- 12ÌõÔÔò£º±£³ÖHTML´úÂëÕû½à&¹æ·¶
ÆÀÂÛ