var div = {
element:'div',
parent:'body',
style: {
width:'100px',
height:'100px',
border:'1px solid black'
}
child: {
element:'input',
type:'text',
name:'age',
value:'22'
}
}
I want to pass this object to a function and the function will recursively create the dom elements
There is a main div and there is a child element input associated with it. The main div has some style which is also applied dynamically.
How can i do this?