# Elements need to be referenced in lowercase, e.g. document.getElementsByTagName(“p”)
元素名必须小写
# document.body is deprecated, instead reference it by id or use
document.body 属于不推荐,应该使用id或者(如下的格式)
document.getElementsByTagName(“body”).item(0)
# Collections like document.images, document.applets, document.links, document.forms and document.anchors do not exist when serving XHTML as XML, instead use document.getElementsByTagName()
如果伺服为 XHTML(XML)的话,document.images, document.applets, document.links, document.forms 和 document.anchors 将不复存在。
# innerHTML and document.write cannot be used anymore, instead use DOM methods, e.g. document.createElementNS(“http://www.w3.org/1999/xhtml”, “div”)
innerHTML 和 document.write 将不能使用,取而代之以 DOM 方法,如
document.createElementNS(“http://www.w3.org/1999/xhtml”, “div”)
via http://www.bobbyvandersluis.com/articles/goodpractices.php