顯示廣告
隱藏 ✕

※ 本文為 tomin 轉寄自 tomin.bbs@tomin.twbbs.org 時間: 2011-06-15 12:15:01

看板 coding
作者 tomin (科學大師、哲學博士)
標題 appendChild, DOM API, isInt
時間 2011/06/14 Tue 15:59:07


http://www.cnitblog.com/yemoo/archive/2007/10/30/35581.html
如果appendChild的参数是页面存在的一个元素,则执行后原来的元素会被移除,如
document.getElement("a").appendChild(document.getElementById("b")),执行后,
b元素会先被移除,然后再添加到a中。

DOM API
http://221.199.150.103/jsj/html/page/book/js/HtmlDom.htm
http://www.javascriptkit.com/domref/documentmethods.shtml

http://www.peterbe.com/plog/isint-function
function isInt(x) {
   var y=parseInt(x);
   if (isNaN(y)) return false;
   return x==y && x.toString()==y.toString();
}

--
  Origin:  Loess Plateau˙黃土高原  tomin.twbbs.org
  Author: tomin 從 tomin.mdorm.ntnu.edu.tw 發表


--
※ 看板: tomin 文章推薦值: 0 目前人氣: 0 累積人氣: 37 
guest
x)推文 r)回覆 e)編輯 d)刪除 M)收藏 ^x)轉錄 同主題: =)首篇 [)上篇 ])下篇