How to make so that deduced the result from the table?

How to make so that deduced the result from the table?
the result, found the string and drop down menu column.
and output the final data

for example, when the END 37
and 4 column
hatched value 1900
<script type="text/javascript">
function calc() { 
 var operations = document.getElementById("operations");

 var workers = document.getElementById("workers");

 var system = document.getElementById("system"); 

 var result = document.getElementById("operations");
 var result = document.getElementById("workers");
 var result = document.getElementById("result_system");
 var result = document.getElementById("result");

 var price_operations = 0;
 var price_workers = 0;
 var price_system = 0; 

 var price = 0; 

 price_operations += parseInt(operations.value)*2;
 price_workers += parseInt(workers.value)*3;
 price_system += parseInt(system.options[system.selectedIndex].value);

 result_operations.innerHTML = price_operations;
 result_workers.innerHTML = price_workers;
 result_system.innerHTML = price_system;

 price=price_operations + price_workers;

 result.innerHTML = price;
 <td width="100"><input type="text" id="operations" value="0" onchange="calc()"></td>
 <td width="200"><span id="result_operations">0</span></td>
the <tr>
 <td width="100"><input type="text" id="workers" value="0" onchange="calc()"></td>
 <td width="200"><span id="result_workers">0</span></td>
the <tr>
 <td width="250" class="td_result">TOTAL:</td>
 <td class="td_result"><span id="result">0</span></td>
the <tr>
 <td width="100">
 <select onchange="calc()" id="system">
 <option value>Not selected</option>
 <option value="0">1</option>
 <option value="1">2</option>
 <option value="2">3</option>
 <option value="3">4</option>
 <option value="4">5</option>
 <td width="200"><span id="result_system">0</span></td>
the <tr>
the <tr>
the <tr>
the <tr>
the <tr>
the <tr>
July 9th 19 at 10:30
1 answer
July 9th 19 at 10:32
Using if/else statements we find the desired row.
var selected_column = 0; //selected column from the list
var row_index = 0; //the index of the row
if(value > 0 && value < 4)
 row_index = 1;
}elseif(value > 3 && value < 11){
 row_index = 2;

And after we find the right tr by its index, and it's already looking for the column index:

var table = document.getElementsByTagName('table'); // get the table
var rows = table[1].getElementsByTagName('tr'); //select all rows of the table(you have two, select the second(index starts with 0)) this table
var columns = rows[4].getElementsByTagName('td'); //columns to select the rows you want, then enter the index obtained after the if/else
alert(columns[4].textContent); //finally get the value, then enter the index of the selected column

Better using jQuery
Thanks, but I can not understand? could you help me - Osborn commented on July 9th 19 at 10:35
: no! you are on the edge lazy! I'm above you wrote 90% , remaining 10% fill in yourself! - Pedro_Herzog commented on July 9th 19 at 10:38

Find more questions by tags HTMLJavaScript