我正在尝试做这个简单的 AppendChild,调用没有成功:
//Create Video and Apply
function makeVid(src,wW,hH,Ref){
var NewSrc= SrcCollect[Ref];
var ambVid= document.createElement("VIDEO");
ambVid.setAttribute("width",wW);
ambVid.setAttribute("height",hH);
ambVid.setAttribute("src",src);
ambVid.setAttribute("controls","controls");
ambVid.className="ambiVidElement";
ambVid.id="ambiVidElement"+Ref;
var holder = document.getElementById("ambi_vid_wrapper"+Ref);
holder.appendChild(ambVid);
}
它不会产生错误,即使我使用 try{} 来捕获错误,也没有错误,但是我创建并要附加的元素不会出现在页面上...