trying to create td with rowspan : 
trying to create td with rowspan

i have to create a table with 6 columns from the second column the user has to set the rowspan 

for example

column 2 row1 column3 row1
column 2 row2 column3 row1
column 2 row3 column3 row1


function addRow() {
         
    var myName = document.getElementById("namez");
    var age = document.getElementById("age");
    var table = document.getElementById("myTableData");

    var rowCount = table.rows.length;
    var row = table.insertRow(rowCount);

    row.insertCell(0).innerHTML= '<input type="button" value = "Delete" onClick="Javacsript:deleteRow(this)">';
    row.insertCell(1).innerHTML= '<input type="text" name="txtbox1[]" />';
    row.insertCell(2).innerHTML= '<input type="text" name="txtbox2[]" />';
    var td3 = row.insertCell(3).innerHTML= '<input type="text" name="txtbox3" />';
    td3.setAttribute('rowSpan', '2');