I want to add border to my table using javascript so when I am using
var table=document.createElement("table").style.border="1px solid";
and try to append the row to this table like this
table.appendChild(newRow);
above line is throwing exception as follows:
Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
and if I try to execute the same code without giving border it executes properly please help me with this.