0

I have some problem. Me need to create dynamically - 40 div's in one container by Javascript (div also). Like a calendar days in calendar . Please help ! Don't know how to do that.

1 Answers1

0

Take a look at this question:

Code from the answer (modified):

//Your existing div
var divP = document.getElementById('divParent');

// Now create and append to divP
var innerDiv = document.createElement('div');
innerDiv.className = 'innerDiv';

// Append it to the parent div
iDiv.appendChild(divP);

//Repeat it 40 times...

Also check this tutorial for appendChild out

Community
  • 1
  • 1
91378246
  • 488
  • 6
  • 14