HTML:
<div class="takeIDfromhere">400788381251</div>
JavaScript:
<script>
var ID = document.getElementsByClassName('.takeIDfromhere');
for(var i=0; i < ID.length; i++) {
document.write('\<div class="testclass">'+ID[i]+'</div> \ ');
}
</script>
My point is, JavaScript must run when document ready.
This did not work.
Where is the mistake?