czwartek, października 20, 2005

DOM

http://www.avvenu.com/products/index.html - serwis umożliwiający udostępnianie zasobów na zasadzie P2P
http://www.smartofficenews.com.au/Computing/Platforms_And_Applications?article=/Computing/Platforms%20And%20Applications/News/N4S8U6B4 - Jak zainstalować własny serwer FTP w domu (How To Set Up A Home FTP Site)
http://www.informit.com/library/content.asp?b=STY_JavaScript_24_hours&seqNum=273 – na czym polega dostęp do elementów przeglądarki. Realizuje to DOM. W wersji DOM 1 jest uniwersalnym standardem sposobem dostępu do obiektów zgrupowanych w elemencie nadrzędnym document z DOM 0.
Podstawowe właściwości węzła (Basic Node Properties) - Each object has certain common properties:
  • nodeName is the name of the node (not the ID). The name is the tag name for HTML tag nodes, #document for the document node, and #text for text nodes.

  • nodeType is a number describing the node's type: 1 for HTML tags, 3 for text nodes, and 9 for the document.

  • nodeValue is the text contained within a text node.

  • innerHTML is the HTML contents of a container node.

  • id is the value of the ID attribute for the node.

  • classname is the value of the class attribute for the node.

Relacje między właściwościami (Relationship Properties) - The following properties describe an object's relationship with others in the hierarchy:
  • firstChild is the first child node for the current node.

  • lastChild is the last child object for the current node.

  • childNodes is an array of all of the child nodes under a node.

  • previousSibling is the sibling before the current node.

  • nextSibling is the sibling after the current node.

  • parentNode is the object that contains the current node.

Przesunięcie - While not part of the W3C DOM, both Netscape and Internet Explorer support the following properties that provide information about a node's position:
  • offsetLeft is the distance from the left-hand side of the browser window or containing object to the left edge of the node object.

  • offsetTop is the distance from the top of the browser window or containing object to the top of the node object.

  • offsetHeight is the height of the node object.

  • offsetWidth is the width of the node object.

Style - The style child object under each DOM object includes its style sheet properties. These are based on attributes of a style attribute, <style> tag, or external style sheet. See Hour 18, "Working with Style Sheets," for details on these properties.

Metody dotyczące węzłów - The following methods are available for all DOM nodes:
  • appendChild(node) adds a new child node to the node after all of its existing children.

  • insertBefore(node,oldnode) inserts a new node before the specified existing child node.

  • replaceChild(node,oldnode) replaces the specified old child node with a new node.

  • removeChild(node) removes an existing child node.

  • hasChildNodes() returns a Boolean value of true if the node has one or more children, or false if it has none.

  • cloneNode() returns a copy of the current node.

  • getAttribute( attribute_name) gets the value of the attribute you specify and stores it in a variable.

  • setAttribute( attribute _ name , value ) sets the value of an attribute.

  • removeAttribute( attribute_name) removes the attribute you specify.

  • hasAttributes() simply returns true if the node has attributes, and false if it has none.

Metody i właściwości document - The following are methods and properties of the document object:
  • document.getElementById( ID ) returns the element with the specified ID attribute.

  • document.getElementsByTagName( tag ) returns an array of the elements with the specified tag name. You can use the asterisk (*) as a wildcard to return an array containing all of the nodes in the document.

  • document.createElement( tag ) creates a new element with the specified tag name.

  • document.createTextNode( text ) creates a new text node containing the specified text.

  • document.documentElement is an object that represents the document itself, and can be used to find information about the document.

Brak komentarzy: