热门关键字:
会员中心
用户名:
密 码:
验证码:
 
推荐文档
 
当前位置:主页>编程学习>java源码及技巧>Javascript>文章内容
Javascript - javascript 应用- 操作节点的函数
来源: 作者:JingJingDe.net 发布时间:2008-07-27  

d1.removeNode(true);
oUL1.insertBefore(nod, oLIYellow);%26lt;br%26gt;
var oCloneNode = oList.cloneNode(true);
/* When the cloned node is added,
'oList' becomes a collection.
*/
document.body.insertBefore(oCloneNode);
var oNewNode = document.createElement("LI");
oList.appendChild(oNewNode);
oElement = object.insertAdjacentElement(sWhere, oElement)
Required. String that specifies where to insert the HTML element, using one of the following values:
beforeBegin Inserts oElement immediately before the object.
afterBegin Inserts oElement after the start of the object but before all other content in the object.
beforeEnd Inserts oElement immediately before the end of the object but after all other content in the object.
afterEnd Inserts oElement immediately after the end of the object.

%26lt;SCRIPT%26gt;
// returns the list item labeled 'List Item 2'
var oSibling = oList.childNodes(0).nextSibling;

var oSibling = oList.childNodes(1).previousSibling;
var olastChild = oList.lastChild;
firstChild

%26lt;/SCRIPT%26gt;

%26lt;BODY%26gt;
%26lt;UL ID = oList%26gt;
%26lt;LI%26gt;List Item 1
%26lt;LI%26gt;List Item 2
%26lt;LI%26gt;List Item 3
%26lt;/UL%26gt;
%26lt;BODY%26gt;

object.setAttribute(sName, vValue [, iFlags])
vAttrValue = object.getAttribute(sAttrName [, iFlags])



 
[收藏] [推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
用户名: 新注册) 密码: 匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
 

网站版权信息

为我最爱的静静而奋斗!为我最爱的多多而努力!by.莫名奇妙

联系站长:QQ:44611446