摘要:
function createImg(){ var imgEle=document.createElement("img"); imgEle.setAttribute("id","ima"); imgEle.setAttribute("src","zhanweifu");document.getElementsByTagName("body")[0].appendChild(imgEle); }对于新create的元素,javascript有个insertBefore(new 阅读全文