eventtable = document.getElementById('eventTable')
eventtable.insertRow(-1)
newTd = eventtable.rows[eventtable.rows.length-1].insertCell(-1)
newTd.innerHTML = "<input type='checkbox' name='eventContentDelete' id='eventContentDeleteID' />"
alert(document.getElementsByName('eventContentDelete').length)
比如在某个<div id="a"></div>里面添加一个checkBox
document.getElementById("a").innerHTML = "<input type='checkbox' checked />"
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)