<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://zhidian.wuute.com/html5dev/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://zhidian.wuute.com/html5dev/feed.php">
        <title>HTML5知典 36:16</title>
        <description></description>
        <link>http://zhidian.wuute.com/html5dev/</link>
        <image rdf:resource="http://zhidian.wuute.com/html5dev/lib/tpl/bootstrap3_1/images/favicon.ico" />
       <dc:date>2026-05-26T01:16:33+09:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://zhidian.wuute.com/html5dev/doku.php/36/16/06?rev=1492098118&amp;do=diff"/>
                <rdf:li rdf:resource="http://zhidian.wuute.com/html5dev/doku.php/36/16/16?rev=1492930538&amp;do=diff"/>
                <rdf:li rdf:resource="http://zhidian.wuute.com/html5dev/doku.php/36/16/21?rev=1492926482&amp;do=diff"/>
                <rdf:li rdf:resource="http://zhidian.wuute.com/html5dev/doku.php/36/16/26?rev=1492927363&amp;do=diff"/>
                <rdf:li rdf:resource="http://zhidian.wuute.com/html5dev/doku.php/36/16/31?rev=1492927932&amp;do=diff"/>
                <rdf:li rdf:resource="http://zhidian.wuute.com/html5dev/doku.php/36/16/36?rev=1492930610&amp;do=diff"/>
                <rdf:li rdf:resource="http://zhidian.wuute.com/html5dev/doku.php/36/16/41?rev=1492929823&amp;do=diff"/>
                <rdf:li rdf:resource="http://zhidian.wuute.com/html5dev/doku.php/36/16/start?rev=1492924731&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://zhidian.wuute.com/html5dev/lib/tpl/bootstrap3_1/images/favicon.ico">
        <title>HTML5知典</title>
        <link>http://zhidian.wuute.com/html5dev/</link>
        <url>http://zhidian.wuute.com/html5dev/lib/tpl/bootstrap3_1/images/favicon.ico</url>
    </image>
    <item rdf:about="http://zhidian.wuute.com/html5dev/doku.php/36/16/06?rev=1492098118&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-14T00:41:58+09:00</dc:date>
        <title>DOM基础</title>
        <link>http://zhidian.wuute.com/html5dev/doku.php/36/16/06?rev=1492098118&amp;do=diff</link>
        <description>DOM基础

DOM简介

DOM(Document Object Model,文档对象模型)将XML/HTML文档构造成一个层次化的节点树,并提供了一系列的应用程序编程接口,以允许程序或脚本动态的访问和修改文档的内容、结构和样式。</description>
    </item>
    <item rdf:about="http://zhidian.wuute.com/html5dev/doku.php/36/16/16?rev=1492930538&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-23T15:55:38+09:00</dc:date>
        <title>增删节点</title>
        <link>http://zhidian.wuute.com/html5dev/doku.php/36/16/16?rev=1492930538&amp;do=diff</link>
        <description>增删节点

示例代码

创建文本节点


var node = domlib.createTextNode(&quot;hello,hudaokeji&quot;);


创建元素节点


var node = domlib.createElemnt(&quot;div&quot;,{
  &quot;style&quot; : &quot;width:100%;height:100%&quot;
});


创建节点块


var node = domlib.createFragment(&quot;&lt;div&gt;&lt;span&gt;label&lt;/span&gt;&lt;input type='text'/&gt;&lt;/div&gt;&quot;);</description>
    </item>
    <item rdf:about="http://zhidian.wuute.com/html5dev/doku.php/36/16/21?rev=1492926482&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-23T14:48:02+09:00</dc:date>
        <title>查找元素</title>
        <link>http://zhidian.wuute.com/html5dev/doku.php/36/16/21?rev=1492926482&amp;do=diff</link>
        <description>查找元素

元素节点的查找

通过节点属性查找

通过节点的相关属性可以直接取得对象节点的父子兄弟节点。
属性说明childNodes获取当前元素节点的所有子节点firstChild获取当前元素节点的第一个子节点</description>
    </item>
    <item rdf:about="http://zhidian.wuute.com/html5dev/doku.php/36/16/26?rev=1492927363&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-23T15:02:43+09:00</dc:date>
        <title>元素的位置</title>
        <link>http://zhidian.wuute.com/html5dev/doku.php/36/16/26?rev=1492927363&amp;do=diff</link>
        <description>元素的位置

获取元素的位置

Element接口提供了众多属性用于获取元素的各种位置（单位像素），这些属性通常为只读，并且只有元素已经在DOM树中且CSS属性的display不为none时才有效。

偏移位置</description>
    </item>
    <item rdf:about="http://zhidian.wuute.com/html5dev/doku.php/36/16/31?rev=1492927932&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-23T15:12:12+09:00</dc:date>
        <title>元素的大小</title>
        <link>http://zhidian.wuute.com/html5dev/doku.php/36/16/31?rev=1492927932&amp;do=diff</link>
        <description>元素的大小

获取元素的大小

Element接口提供了众多属性用于获取元素的各种大小值（单位像素），这些属性通常为只读，并且只有元素已经在DOM树中且CSS属性的display不为none时才有效。

元素的实际大小</description>
    </item>
    <item rdf:about="http://zhidian.wuute.com/html5dev/doku.php/36/16/36?rev=1492930610&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-23T15:56:50+09:00</dc:date>
        <title>元素的样式</title>
        <link>http://zhidian.wuute.com/html5dev/doku.php/36/16/36?rev=1492930610&amp;do=diff</link>
        <description>元素的样式

示例代码

获取元素的样式


   var backgroundColor = domlib.css(node,&quot;backgroundColor&quot;);


设置元素的样式


   domlib.css(node,&quot;backgroundColor&quot;,&quot;red&quot;);


工具函数列表

uDOMlib所提供的工具函数之中，有一部分与元素样式相关，下面列出部分函数的源代码实现以供参考。</description>
    </item>
    <item rdf:about="http://zhidian.wuute.com/html5dev/doku.php/36/16/41?rev=1492929823&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-23T15:43:43+09:00</dc:date>
        <title>元素的属性</title>
        <link>http://zhidian.wuute.com/html5dev/doku.php/36/16/41?rev=1492929823&amp;do=diff</link>
        <description>元素的属性

获取和设置HTML属性文本


var disabled = nodelib.attr(node,&quot;disabled&quot;);
nodelib.attr(node,&quot;disabled&quot;,&quot;&quot;);



获取和设置DOM对象属性


var disabled = nodelib.prop(node,&quot;disabled&quot;);
nodelib.prop(node,&quot;disabled&quot;,false);</description>
    </item>
    <item rdf:about="http://zhidian.wuute.com/html5dev/doku.php/36/16/start?rev=1492924731&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-23T14:18:51+09:00</dc:date>
        <title>文档对象模型</title>
        <link>http://zhidian.wuute.com/html5dev/doku.php/36/16/start?rev=1492924731&amp;do=diff</link>
        <description>文档对象模型

定义

文档对象模型 (Document Object Model，简称 DOM ) 是 HTML 和 XML 文档的编程接口。

概述

DOM给文档元素组织成一个结构树，并且定义了一整套的接口，使程序可以对结构树进行访问，以改变文档的结构，样式和内容。</description>
    </item>
</rdf:RDF>
