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";

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question
  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:

    <tr> <td>red< td> <td>orange< td> <td>yellow< td> </tr>

     

       

    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"; 

     

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Form and its Elements
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage