SHARE
TWEET

Untitled

a guest Nov 15th, 2017 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. var mb = document.querySelector("input[name=medidab]");
  3. mb.addEventListener("keyup", calcImc, false);
  4. function calcImc(){
  5.    var md_val = parseFloat(mb.value);
  6.    medidab = (md_val/50*100).toFixed(1);
  7.    if(!isNaN(medidab)){
  8.       document.querySelector("input[name=circunferenciabraco]").value = medidab;
  9.    }
  10. }
  11. </script>
  12.    
  13. <div>
  14.    <input class="campo-form-c" type="text" name="medidab" placeholder="Medida do Braço" maxlength="5">
  15. </div>
  16. <div>
  17.    <input class="campo-form-c" type="text" name="circunferenciabraco" placeholder="Circunferência do Braço" maxlength="5"></br>
  18. </div>
RAW Paste Data
Top