I create a dynamical tag with id "video1" inside the static tag with id "videos":
document.getElementById("videos").innerHTML = '<div id="video1"></div>';
But when I want to append another script tag, I failed.
The following is my code to append that tag:
var s = document.createElement("script");
s.id = "scriptId"; //script tag's id
document.getElementById("video1").appendChild(s);
The above code works for static tag, but it doesn't work for the dynamical generated tag video1. So is there any way I can append a script tag to an another tag which is also dynamically generated by javascript?
Thanks.