Hi, im new to Js and i have this code:
assuming that the variables are all correct and working,
why is only this produced:
instead of:
and is there a solution?
Code:
var div = document.createElement("div"); div.id = field+count; div.name = field+count; div.class = "bubble_green"; var p = document.createElement("p"); p.appendChild(document.createTextNode('Question '+count)); div.appendChild(p); field_area.appendChild(div);
why is only this produced:
Code:
<div id="question_3"><p>Question 3</p></div>
Code:
<div id="question_3" name="question_3" class="bubble_green"><p>Question 3</p></div>
Comment