惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Help Net Security
Help Net Security
G
Google Developers Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Engineering at Meta
Engineering at Meta
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
F
Full Disclosure
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
U
Unit 42
C
Cyber Attacks, Cyber Crime and Cyber Security
V
V2EX
C
Cisco Blogs
博客园 - 司徒正美
Project Zero
Project Zero
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
Scott Helme
Scott Helme
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog
S
Securelist
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyberwarzone
Cyberwarzone
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
T
Threatpost
Recorded Future
Recorded Future
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
S
Security Archives - TechRepublic
博客园 - Franky
N
News | PayPal Newsroom
Simon Willison's Weblog
Simon Willison's Weblog
S
SegmentFault 最新的问题
W
WeLiveSecurity
A
Arctic Wolf
B
Blog

博客园 - zfh424

Ext自定义类 JavaScript中匿名函数,函数直接量和闭包(转) Extjs3.0 Javascript小助手 DOM标准定位 HTML 对象的定位. EXTJS2.2 FormPane对象研究 EXTJS-Grid HTML事件集合 使用企业库调用存储过程,并接受return 的返回值 Windwos服务的安装卸载 枚举 C#类型 C#可空类型 c#基础 开始记录我的追逐历程 Eds 模拟窗体 js 游戏 POP的使用组件
DOM属性,函数
zfh424 · 2009-02-03 · via 博客园 - zfh424

DOM属性,函数

函数名:createElement (“对象”)

类型:新建节点

说明:节点元素

参数:节点元素

返回:指向元素的指针

示例:document.createElement(”DIV”);

函数名:createTextNode(“文本”);

类型:新建节点

说明:创建文本

参说:文本

返回:指向文本的指针

示例:document.createTextNode(“Hello word”);

函数名:cloneNode(deep);

类型:复制节点

说明:创建文本

参数:deep

是否复制节点下面所有子节点True|False

返回:指向新节点对象的指针

示例:Node.cloneNode(True);

函数名:appendChild(node);

类型:插入节点

说明:插入节点

参说:节点元素

返回:无返回

示例:node.appendChild(element);

函数名:insertBefore(newNode,targetNode)

类型:插入节点;

说明:在目标节点前插入新节点

参说:

newNode:新节点

targetNode:目标节点

返回:指向新节点对象的指针

示例:targetParentNode .insertBefore(newNode,targetNode)

函数名:removeChild(node)

类型:删除节点

说明:删除目标节点

参说:

Node:被删除的节点

返回:无

示例:removeChild(node)

函数名:replaceChild(newnode,oldnode)

类型:替换节点

说明:替换节点

参说:

newnode:新节点

oldnode:旧节点

返回:无

示例:oldtargetNode.replaceChild (newnode,oldnode)

函数名:setAttribute(name,value)

类型:设置节点属性

说明:设置节点属性

参说:

Name:节点属性名

Value:值

返回:无

示例:node.setAttribute(name,value)

Node.getAttribute(name)

得到节点属性

getElementById(nodeid)

获取节点

getElementsByTagName(nodename)

获取节点集合

hasChildNodes()

是否有子节点

object.contains(oelement)

object中是否包含oelement对象

DOM属性

nodeName 节点名称

nodeType 节点类型

nodeValue 节点值

childNodes遍历子节点

firstNode 第一个节点

lastNode 最后一个节点

nextSibling 下个节点

previousSibling 上个节点

parentNode 上个节点