javascriptÖÐDOM½Úµã
nodeName
nodeName ÊôÐÔº¬ÓÐij¸ö½ÚµãµÄÃû³Æ¡£
ÔªËØ½ÚµãµÄ nodeName ÊDZêÇ©Ãû³Æ
ÊôÐÔ½ÚµãµÄ nodeName ÊÇÊôÐÔÃû³Æ
Îı¾½ÚµãµÄ nodeName ÓÀÔ¶ÊÇ #text
Îĵµ½ÚµãµÄ nodeName ÓÀÔ¶ÊÇ #document
×¢ÊÍ£ºnodeName Ëù°üº¬µÄ XML ÔªËØµÄ±êÇ©Ãû³ÆÓÀÔ¶ÊÇ´óдµÄ
nodeValue
¶ÔÓÚÎı¾½Úµã£¬nodeValue ÊôÐÔ°üº¬Îı¾¡£
¶ÔÓÚÊôÐԽڵ㣬nodeValue ÊôÐÔ°üº¬ÊôÐÔÖµ¡£
nodeValue ÊôÐÔ¶ÔÓÚÎĵµ½ÚµãºÍÔªËØ½ÚµãÊDz»¿ÉÓõġ£
nodeType
×÷ ÓÃ
±æÊ¶½ÚµãµÄDOM ÐÍ̬¡£ ¡¡
»ù±¾Óï·¨
numNodeType £½ xmlDocNode.nodeType ;
¡¡
˵ Ã÷
´ËÊôÐÔÖ»¶ÁÇÒ´«»ØÒ»¸öÊýÖµ¡£
ÓÐЧµÄÊýÖµ·ûºÏÒÔϵÄÐͱð£º
1-ELEMENT (ÔªËØ)
2-ATTRIBUTE £¨ÊôÐÔ£©
3-TEXT £¨Îı¾£©
4-CDATA
5-ENTITY REFERENCE
6-ENTITY
7-PI (processing instruction)
8-COMMENT £¨×¢ÊÍ£©
9-DOCUMENT £¨£©
10-DOCUMENT TYPE
11-DOCUMENT FRAGMENT
12-NOTATION
¡¡
¡¡
·¶ Àý
numNodeType £½ xmlDoc.documentElement.nodeType;
alert(numNodeType);
Node Types
½ÚµãÀàÐÍ
The following table lists the different W3C node types, and which node types they may have as children:
ÏÂÊö±í¸ñÁоÙÁ˲»Í¬µÄW3C½ÚµãÀàÐÍ£¬Ã¿¸ö½ÚµãÀàÐÍÖпÉÄÜ»á°üº¬×ÓÀࣺ
Node type
½ÚµãÀàÐÍDescription
ÃèÊöChildren
×ÓÀà
Document
Îĵµ
Represents the entire document (it is the root-node of the DOM tree)
¶¨ÒåÕû¸öÎĵµ£¨DOMÊ÷µÄ¸ù½Úµã£©
Element (max. one), ProcessingInstruction, Comment, DocumentType
DocumentFragment
ÎĵµÆ¬¶Ï
Represents a "lightweight" Document object, which can hold a portion of a document
¶¨Òå“lightweight”Îĵµ¶ÔÏ󣨱£ÁôÒ»¸öÎĵµÖеÄÒ»²¿·Ö£©
Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference
DocumentType
ÎĵµÀàÐÍ
Represents a list of the entities that are defined for the document
¶¨ÒåÎĵµµÄʵÌåÁбí
None
EntityReference
ʵÌå²ÎÊý
Represents an entity reference
¶¨ÒåÒ»¸öʵÌå²ÎÊý
Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference
Element
ÔªËØ
Represents an element
¶¨ÒåÒ»¸öÔªËØ
Element, Text, Comment, ProcessingInstruction, CDATASection, EntityReference
Attr
ÊôÐÔ
Represents an attribute. Not
Ïà¹ØÎĵµ£º
8¡¢Ext.jsµÄдÀ෽ʽ
ÕâÀïÓõÄÊÇExt core3.0£¬ExtÖÐÓÃExt.extendÀ´¶¨ÒåÒ»¸öÀࣨµ±È»Ëü¸ü¶àÓÃÀ´À©Õ¹Ò»¸öÀࣩ£¬ExtÕû¸ö¿ò¼Ü¸÷ÖֿؼþÈçPanel£¬MessageBoxµÈ¶¼ÊÇÓÃExt.extend·½·¨À´À©Õ¹¡£ÕâÀï½ö½öÓÃËüÀ´¶¨ÒåÒ»¸ö×î¼òµ¥µÄÀà¡£
¿´Ext.extendµÄ´úÂë¿ÉµÃÖª£¬ËüÈÔÈ»ÊÇÓù¹Ô캯ÊýºÍÔÐÍÀ´×é×°Ò»¸öÀà¡£
ÕâÀïÖ»Ðè´«Á½¸ö²ÎÊý¼´¿É£¬µÚÒ ......
Do you want an ultra fast web site? Get JSL and optimize your JavaScript loading now!
Imagine there's a 4-lane highway between your web browser and the internet itself. This highway is optimize to let pictures, text, and css fly by. But, when it comes to external scripts, the highway crea ......
<html>
<head>
<title>changePage</title>
</head>
<body>
<table id="pic" cellpadding="0" cellspacing="0" border="1" width="200" height="100" bordercolor="red">
<tr>
<td>picture chanage!</td>
</tr>
</table>
< ......
×î½üÔÚÍøÉϲéÔÄÁ˲»ÉÙJavascript±Õ°ü(closure)Ïà¹ØµÄ×ÊÁÏ£¬Ð´µÄ´ó¶àÊǷdz£µÄѧÊõºÍרҵ¡£¶ÔÓÚ³õѧÕßÀ´Ëµ±ð˵Àí½â±Õ°üÁË£¬¾ÍÁ¬ÎÄ×ÖÐðÊö¶¼ºÜÄÑ¿´¶®¡£×«Ð´´ËÎĵÄÄ¿µÄ¾ÍÊÇÓÃ×îͨË×µÄÎÄ×Ö½Ò¿ªJavascript±Õ°üµÄÕæÊµÃæÄ¿¡£
¡¡¡¡Ò»¡¢Ê²Ã´ÊDZհü£¿
¡¡¡¡“¹Ù·½”µÄ½âÊÍÊÇ£ºËùν“±Õ°ü”£¬Ö¸µÄÊÇÒ»¸öÓµÓÐÐ ......