Hello I was typing this code to display the table's info in txt boxes but I found a problem here: Uncaught TypeError: Cannot read property 'length' of undefined.
Id Name Email Country City 1 Aymen Zitouni Email Country City var tbl = document.getElementsByClassName("TableInfo"); document.write(tbl.rows.length); for (var x = 1 ; x<form class="InfoForm" method="POST">
<div>
<label>ID</label> <input type="text" id="txtNumber">
<br><br>
<label>Name</label> <input type="text" id="txtName">
<br><br>
<label>Email</label> <input type="email" id="txtEmail">
<br><br>
<label>Country</label> <select id="txtCountry"><option>Tunisia</option>
<option>Germany</option>
<option>Italy</option>
<option>America</option>
</select>
<br><br>
<label>City</label> <input type="text" id="txtCity">
<br><br>
<button>Show</button>
<button>Insert</button>
<button>Delete</button>
<button>Update</button>
</div>
</form>