Javascript Unit Converter with 2 dropdowns menus

Hello everyone. I’m new to javascript. Trying to build, for practice, a simple unit converter kind of like the one that google uses.
I’d like to have an input box for entering the number value.
After that, two lists in the HTML files so i can choose in first the unit i convert from; and on the second the unit i convert to.
Maybe is an obvious one but i have not been able to find an answer to this problem. I’ll post the last code/approach i tried.


<!DOCTYPE html>
<html lang="en" dir="ltr">
    <meta charset="utf-8">
    <script src="simpleweightconversortest.js"></script>
      <!-- Select 1-->
      <select name="converts" id="Selection">
          <option>Chose Option</option>
          <option value="kilograms1">Kilograms</option>
          <option value="grams1">Grams</option>
          <option value="miligrams1">Miligrams</option>

      <!-- Select 2-->
    <select name="converts2" id="Selection2">
        <option>Chose Option</option>
        <option value="kilograms2">Kilograms</option>
        <option value="grams2">Grams</option>
        <option value="miligrams2">Miligrams</option>

      <input type="number" id="value" placeholder="Insert value">

  <!--RESULT -->
      <input type="text" id="convertedOuput">

      <input type="Button" onclick="Conversion()"


    var val = document.getElementById("value").value;
    var convertedOuput =document.getElementById("convertedOuput");

    var selectFrom = document.getElementById("Selection");
    var selectTo = document.getElementById("Selection2");

    var  madeSelection_1 = selecFrom[selectFrom.selectedIndex].value;
    var  madeSelection_2 = selectTo[selectTo.selectedIndex].value;

  function Conversion() {
    if (madeSelection_1 == "kilograms1" && madeSelection_2 == "kilograms2") {
      var result = val * 1;
      document.getElementById('convertedOuput').innerHTML = result;