Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

javascriptдÀ෽ʽ֮°Ë

8¡¢Ext.jsµÄдÀ෽ʽ
ÕâÀïÓõÄÊÇExt core3.0£¬ExtÖÐÓÃExt.extendÀ´¶¨ÒåÒ»¸öÀࣨµ±È»Ëü¸ü¶àÓÃÀ´À©Õ¹Ò»¸öÀࣩ£¬ExtÕû¸ö¿ò¼Ü¸÷ÖֿؼþÈçPanel£¬MessageBoxµÈ¶¼ÊÇÓÃExt.extend·½·¨À´À©Õ¹¡£ÕâÀï½ö½öÓÃËüÀ´¶¨ÒåÒ»¸ö×î¼òµ¥µÄÀà¡£
¿´Ext.extendµÄ´úÂë¿ÉµÃÖª£¬ËüÈÔÈ»ÊÇÓù¹Ô캯ÊýºÍÔ­ÐÍÀ´×é×°Ò»¸öÀà¡£
ÕâÀïÖ»Ðè´«Á½¸ö²ÎÊý¼´¿É£¬µÚÒ ......

javascriptдÀ෽ʽ֮ʮ

10¡¢mootools.jsµÄдÀ෽ʽ
mootools.jsµÄ×îа汾ÊÇ1.2.3,ÕâÀïʹÓõÄÊÇ1.2.0¡£mootool±»Éè¼Æ³É·Ç³£½ô´ÕµÄ£¬Ä£¿é»¯µÄ£¬ÃæÏò¶ÔÏóµÄµÄjs¿â¡£mootoolÖÐдÀàÓÃClassÀà¡£ClassÀàÓÉNativeÀànew³öÀ´µÄ£º
/*
*Script: Class.js
*/
var Class = new Native({
name: 'Class',
initialize: function(properties){
propert ......

JavaScript XMLHttpRequestµÄÓô¦

      Èç¹ûÏë´ÓÍøÒ³Ìá½»²ÎÊýµ½·þÎñÆ÷£¬µÚÒ»¸öÏëµ½µÄ¾ÍÊÇHttpµÄForm±êÇ©¡£Ëü½«Óû§ÔÚ¿Í»§¶ËÍøÒ³ÌîдµÄÊý¾Ýͨ¹ýHTTP Post£¬Ìá½»µ½·þÎñ¶Ë¡£ÕâЩÌá½»µÄÊý¾Ý±»·ÅÔÚHTTPÏûÏ¢µÄbodyÀïÃ棬ÕâÑù£¬Óû§Ìá½»µÄÊý¾ÝÀíÂÛÉÏÊÇûÓ㤶ÈÏÞÖƵġ£Èç¹û·þÎñ¶ËÓõÄÊÇJ2EE£¬HttpServletRequest¿ÉÒԷdz£ÇáËɵÃÈ¡µ½ËùÓвΠ......

JavaScript this ¹Ø¼ü×Ö


thisÊÇJavascriptÓïÑÔµÄÒ»¸ö¹Ø¼ü×Ö¡£
Ëü´ú±íº¯ÊýÔËÐÐʱ£¬×Ô¶¯Éú³ÉµÄÒ»¸öÄÚ²¿¶ÔÏó£¬Ö»ÄÜÔÚº¯ÊýÄÚ²¿Ê¹ÓᣱÈÈ磬
¡¡¡¡function test(){
¡¡¡¡¡¡¡¡this.x = 1;
¡¡¡¡}
Ëæן¯ÊýʹÓó¡ºÏµÄ²»Í¬£¬thisµÄÖµ»á·¢Éú±ä»¯¡£µ«ÊÇÓÐÒ»¸ö×ܵÄÔ­Ôò£¬ÄǾÍÊÇthisÖ¸µÄÊÇ£¬µ÷Óú¯ÊýµÄÄǸö¶ÔÏó¡£
ÏÂÃæ·ÖËÄÖÖÇé¿ö£¬ÏêϸÌÖÂÛthisµÄÓ÷¨¡£
......

JavaScript——Îò͸JavaScript

    ×î½üÕâ¶Îʱ¼äÒ»Ö±ÔÚ¸ãÇ°¶ËJavaScript£¬ÒÔÇ°×ܾõµÃJSûʲô¸ãÍ·£¬¾­¹ýÕâÒ»¶ÎµÄÓ¦Ó㬲ŷ¢ÏÖJsÀïÃæµÄ¶«Î÷ÕæµÄºÜÉîºÜÉîµÄ£¬²»È»ÎªÊ²Ã´¸÷´óÃÅ»§ÍøÕ¾¶¼ÕÐÒ»ÅúJS¹¤³ÌʦÄØ¡£
     ÒÔÏÂÎÄÕÂΪÒýÓÃÀîÕ½ÀϸçµÄ¡¶Îò͸JavaScript¡·Ò»ÎÄ£¬Ð´µÄʵÔÚÌ«ºÃÁË£¬¾ÍÊÕ¼ÁË£¬ÒÔ×ö¸ö±¸Óá£
Òý×Ó
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ