6
rated 0 times
[
9]
[
3]
/ answers: 1 / hits: 21830
/ 10 Years ago, thu, april 3, 2014, 12:00:00
I work with CreateElemant in JavaScript this is my code:
function generateInputs()
{
var i = document.createElement(input);
for(var j=0;j<4;j++)
{
var c = document.createElement(input);
var r = document.createElement(input);
r.setAttribute('type',radio);
document.getElementById('questions').appendChild(r);
c.setAttribute('type',input);
document.getElementById('questions').appendChild(c);
}
i.setAttribute('type',text);
document.getElementById('questions').appendChild(i);
}
And I want to write it with jQuery but I didn't find an equivalent for createElement()
More From » jquery