Is there a way to convert markup string to node object in JavaScript? Actually I am looking for the subsitute for:
document.getElementById("divOne").innerHTML += "<table><tbody><tr><td><input type='text' value='0' /></td></tr></tbody></table>"
something like
document.getElementById("divOne").appendChild(document.createNodeFromString("<table><tbody><tr><td><input type='text' value='0' /></td></tr></tbody></table>"))
using createNodeFromString rather creating the table element then append its child elements then attach their respective attributes and values!
document.getElementById("divOne").appendChild(document.createElement("input"))does retain the value of input in IE9 but I need to append the entire table in a single statement.