Без клика на поле, не обновляются данне

You could add a class to both of your inputs and execute the function on keyup event. Not tested, but something like this should work.
HTML:
<input class="myinputselector" type="text" name="txtPer" id="txtPer" value="" >
<input class="myinputselector" type="text" name="txtAmt" id="txtAmt" value="" >

Код:
$(".myinputselector").keyup(function() {
    let amt = $("#txtAmt").val();
    let per = $("#txtPer").val();
    if(amt !== "" && per !== "" && !isNaN(amt) && !isNaN(per)){
      let res = (amt/100) * per;
      $("#skb-res").html(res);   
    } else {
      $("#skb-res").empty();
    }
  });
Thank you for your answer, but it does not work...
 
Назад
Сверху