I want to get the ID of a div
using JavaScript that runs inside that div
. I want to appendChild()
html to that div
.
eg:
<div id="randomnumber">
<script type="text/javascript">
var htmlcontent = "abcdf";
//need the id of div holder
var thisDIVid= ?????;
// appendChild to this div
?????.appendChild(htmlcontent);
</script>
</div>