You have the code shown below. var table = document.getElementById("table3"); What other lines of code would be necessary to add the first row of the table that that looked like this: ...






  1. You have the code shown below.


    var table = document.getElementById("table3");


    What other lines of code would be necessary to add the first row of  the table that that looked like this:



    red< td> orange< td> yellow< td>
























    var row = table.insertRow(1);
    var c1 = row.insertCell(0);
    var c2 = row.insertCell(1);
    var c3 = row.insertCell(2);


    cell1.innerHTML = "red";
    cell2.innerHTML = "orange";
    cell2.innerHTML = "yellow";





    var row = table.insertRow(0);
    var c1 = row.insertCell(0);
    var c2 = row.insertCell(1);
    var c3 = row.insertCell(2);


    c1.innerHTML = "red";
    c2.innerHTML = "orange";
    c3.innerHTML = "yellow";






    var row = table.insertRow();
    var c1 = row.insertCell(0);
    var c2 = row.insertCell(1);
    var c3 = row.insertCell(2);


    cell1.innerHTML = "red";
    cell2.innerHTML = "orange";
    cell2.innerHTML = "yellow";









Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here