How to auto click button on input field onchange in javascript

The button should be clicked automatically when amount is >0 and dropdown is selected

<html>
  <head>
    <script>
      document.getElementById("changeLanguage").onchange = function() {
        if (inputtxt.value.length == 0) {
          $('#bt').trigger('click');
        }
      };
    </script>
  </head>

  <body><label for="fname">Amount</label><input type="number" id="amt" name="amt"><select onchange="changeLanguage(this.value)">
      <option value="Choose" selected="selected">Choose</option<option value="IT">Italian</option>
      <option value="FR">France</option>
    </select><button type="button" id="bt">Click Me!</button></body>

</html>

I have tried using above code, but didn’t work.