JSFiddle - React, Tailwind, and code Playground

HTML

<select id="selrate" name="selrate" id="selrate">
<option value="1">THB</option>
<option value="41.14">EUR</option>
<option value="32.75">USD</option>
<option value="0.28">JPY</option>                             
</select>


<table class="tablePrice">
    <tr>
        <th>Product </th>
        <th>price</th>
    </tr>
    <tr>
        <td>Product1 </td>
        <td data-price="500">500</td>
    </tr>
    
    <tr>
        <td>Product2 </td>
        <td data-price="50" >50</td>
    </tr> 
    <tr>
        <td>Product3 </td>
        <td data-price="800" >50</td>
    </tr> 
<table>

JavaScript

$("#selrate").on('change', function() {
    var rate = $(this).val();   
    $('.tablePrice [data-price]').each(function() {
        var price = $(this).attr("data-price");
        var exchange  = price / rate;
        $(this).html(exchange);
    });
	
});