Javascript Tips
另一篇博客,记录jQuery的操作: jQuery Tips ; 2. appendChild(newChild),例: oParentNode.appendChild(newElement); 4. 检测jquery是否加载 window.onload = function() { if (window.jQuery) { // jQuery is loaded alert("Yeah!"); } else { // jQuery is not loaded alert("Doesn't Work"); } } 6. document.forms[""] 得到当前document的某个form,document.forms得到的是当天document中所有form的集合,详见 W3school ; 7. JS注释 单行: // document.getElementById(""); 多行: /* document.getElementById("myH1").innerHTML="Welcome to my Homepage"; document.getElementById("myP").innerHTML="This is my first paragraph."; */ 8. XML中的冒号需要转义,例如,z:row要写成z\\:row才能进行查找,例如: $