Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I made some code tho, it's not working. I am not familiar with Javascript, so if there any issues, please fix it correctly. I will

I made some code tho, it's not working. I am not familiar with Javascript, so if there any issues, please fix it correctly. I will really appreciate it if you do that.

Here is my HTML and javascript code are given below:

The first one is for HTML and the other one is for javascript.

  <html lang="en"> <head> <meta content="en-us" http-equiv="Content-Language"> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <title>assignment2title> <meta content="HTML table, COMP125" name="keywords"> <meta content="Assignment2 HTML tables." name="description"> <script src="http://code.jquery.com/jquery-3.5.1.min.js">script> <link href="assignment2Styles.css" rel="stylesheet" type="text/css"> head> <body> <div id ="Whole" style="width:980px; margin-left:auto; margin-right:auto;"> <header><h2>Assignment2h2> header>          <form> <label class ="input-row" for="rows">Rows:label> <input name ="rows" id="rows" type="number" min="1" step ="1" required tabindex="1"> <label class="input-cols" for="cols">Columns:label> <input name="cols" type="number" id="cols" min="1" step ="1" required tabindex="3"><br>         <br> <button id="btnSubmit" class="btnSubmit" name="submit" type="button" tabindex="5">Click here to draw a tablebutton> <br> <br>            <h2>Here is the resulth2>       <br>       <table id="result" style="height: 3px"> <tr> tr>       table> <footer><h6> assignment2  h6>footer> form> div>   <script src="assignment2.js">script> body> html> 

var rows = Number; var cols = Number; var table = 0; function createTable() {   rows = document.getInput("rows").value;   cols = document.getInput("cols").value;   table += "";   for (i = 1; i <= rows; i++) {     table += "";     for (j = 1; j <= cols; j++) {       table += "";     }     table += "";   }   table += "
"; table += i + "." + j; table += "
"
; document.getInput('result').innerHTML = table; table = ""; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

U11 Informing Industry: Publicizing Contract Actions 317

Answered: 1 week ago