js 把旧节点放进新节点函数 fPutNodeInNewNode

类别: Javascript, function
标签: js, fInsertNode, node, fPutNodeInNewNode, put
摘要: ..
正文:
  1.   function fPutNodeInOther(OldNode, NewNode)
  2.   {// shawl.qiu script
  3.    fInsertNode(OldNode, NewNode, true);
  4.    OldNode.parentNode.removeChild(OldNode);
  5.    NewNode.appendChild(OldNode);
  6.  
  7.    function fInsertNode(OldNode, NewNode, bBefore)
  8.    {// shawl.qiu script
  9.     var ParentNode = OldNode.parentNode;
  10.     if(!ParentNode)return false;
  11.     if(bBefore)
  12.     {
  13.      ParentNode.insertBefore(NewNode,OldNode);
  14.         return false;
  15.     } // end if
  16.     ParentNode.replaceChild(NewNode, OldNode);
  17.     ParentNode.insertBefore(OldNode, NewNode);
  18.    } // end function fInsertNode
  19.    
  20.   } // end function fPutNodeInOther
 
文章相关信息:
主题: js 把旧节点放进新节点函数 fPutNodeInNewNode
发表者: shawl.qiu
电子邮件: shawl.qiu@gmail.com
QQ: 908202921
MSN: btbtd@msn.com
Homepage: http://www.btbtd.org/
Blog: http://blog.csdn.net/btbtd/
发表日期: 2007-5-19 16:12:15
更新日期: 2007-5-19 16:12:15
来源引用: shawl.qiu CSharp DotNet 个人资料管理系统
引用本页: http://gi.2288.org/mod/code/display/Default.aspx?aid=427
关闭
Google
搜索WWW
搜索www.btbtd.org
搜索blog.csdn.net
Powered by shawl.qiu © 2008-2010 the shawl.qiu Javascript Kits
Copyright © 2008-2010 by shawl.qiu