Javascript - как показать строку таблицы на основе флажка

Я хочу отобразить строку таблицы на основе выбора флажка, где мне нужно отобразить только определенную строку. Я ноб в JavaScript, как я могу достичь этого.

Я пробовал много javascript сниппетов из stackoverflow, но они не работают как ожидалось. пожалуйста, помогите мне разобраться с этим. спасибо заранее

Вот мой html

       <div>Country</div>
        <div class="row" name="country_checkbox" id="id_row"  onclick="return filter_type(this);">
         <ul id="id_country">
        <li><label for="id_country_0"><input type="checkbox" name="country" value="NORTHAMERICA" placeholder="Select Country" id="id_country_0">
     NORTHAMERICA</label>
    
    </li>
        <li><label for="id_country_3"><input type="checkbox" name="country" value="LATAM" placeholder="Select Country" id="id_country_3">
     LATAM</label>
    </li>

    <li><label for="id_country_2"><input type="checkbox" name="country" value="ASIA" 
    placeholder="Select Country" id="id_country_2">ASIA</label>
    </li>
    
     </ul>
                </div>
        <table class="datatable" id='table_id'> 
          <thead>
            <thead>
              <tr>
                <th>Region</th>
                <th> Area </th>
                <th> Country </th>
             </tr>
            </thead>
 
          <tbody>
            <tr id="trow">
             {% for i in database%}
              <td>i.Region</td>
              <td>i.Area </td>
              <td>i.Country</td>
           {% endfor %}
             </tr>
          </tbody>
Вернуться на верх