I have an array
var elms = ["When?", "Why", "Where", ......];
I need to create the following elements
<html .. whatever>
<div id="q1"> When? </div>
<input type="text" id="a1"></input>
<div id="q2"> Why? </div>
<input type="text" id="a2"></input>
<div id="q3"> Where? </div>
<input type="text" id="a3"></input>
........
</html>
How can I do this ?
PS: My original page has only this array var elms and nothing else. I need to create all those divisions and inputs. I tried jquery, but messed up with the single and double quotes . . so I gave up.
how to learn a programming languagesite. Question shows a complete lack of research effortelms[0]would generate the entire HTML<div id="q1"> When? </div><input type="text" id="a1"></input>?