title: Hi, how can i make the OPTION have a value inside it? and make it change the message as selecting another option?
body: <p>I want <code>var s</code> to receive the option value, to be able to do the division without having to put the direct number in the var, for example: <code>n1 / value.usd</code> (eur = 5.58) and after that make the <code>&lt;h5&gt;</code> change the text according to the option selected example:</p>
  <ul>
  <li>USD - Dollar =
  <strong>'1 US dollar equal to 5.58 Brazilian real'</strong></li>
  <li>EUR - Euro =
  <strong>'1 Euro equals 6.69 Brazilian Real'</strong>
  <br>I am studying the DOM, so I am trying to do this project, any advice is welcome</li>
  </ul>
  <pre class="lang-html prettyprint-override"><code>&lt;body&gt;
      &lt;div id=&quot;tabela&quot;&gt;
          &lt;h1 id=&quot;title&quot;&gt;Conversor de Real para Dólar&lt;/h1&gt;
          &lt;div id=&quot;area&quot;&gt;
              &lt;strong&gt;R$&lt;/strong&gt;&lt;input type=&quot;number&quot; name=&quot;txtn1&quot; id=&quot;txtn1&quot;&gt; PARA:
              &lt;select name=&quot;txtn2&quot; id=&quot;txtn2&quot;&gt;
                  &lt;option value = &quot;usd&quot;&gt;USD - Dólar&lt;/option&gt; &lt;!--The option that i want put a value--&gt;
                  &lt;option value=&quot;eur&quot;&gt;EUR - Euro&lt;/option&gt;
                  &lt;option value=&quot;gbp&quot;&gt;GBP - Libra Esterlina&lt;/option&gt;
                  &lt;option value=&quot;cad&quot;&gt;CAD - Dólar Canadense&lt;/option&gt;
                  &lt;option value=&quot;jpy&quot;&gt;JPY - Yen&lt;/option&gt;
                  &lt;option value=&quot;cny&quot;&gt;CNY - Yuan&lt;/option&gt;
              &lt;/select&gt;
              &lt;input type=&quot;button&quot; value=&quot;CONVERTER&quot; onclick=&quot;converter()&quot;&gt;
              &lt;div id=&quot;resul&quot;&gt;Clique em &lt;strong&gt;converter&lt;/strong&gt; para ver o resultado em &lt;strong&gt;U$&lt;/strong&gt;!&lt;/div&gt;
              &lt;h5&gt;1 Dólar americano igual a 5,58 Real brasileiro&lt;/h5&gt; &lt;!--The text that i want change conform the option--&gt;
          &lt;/div&gt;
      &lt;/div&gt;   
  &lt;/body&gt;
  </code></pre>
  <p><strong>JS CODE</strong></p>
  <pre class="lang-js prettyprint-override"><code>function converter(){
      let tn1 = document.querySelector('input#txtn1');
      let resul = document.querySelector('div#resul');
      let n1 = Number(tn1.value);
      let s = n1/5.58
      resul.innerHTML = ` Você tinha: &lt;strong&gt;R$${n1.toFixed(2).replace(&quot;.&quot;,&quot;,&quot;).toLocaleString('pt-BR',{style: 'currency', currency:'BRL'})}&lt;/strong&gt;&lt;br&gt;
      Agora você tem: &lt;strong&gt;U$${s.toFixed(2).replace(&quot;.&quot;,&quot;,&quot;).toLocaleString('USA',{style: 'currency', currency:'USD'})}&lt;/strong&gt;&lt;br&gt;
      Clique em &lt;strong&gt;converter&lt;/strong&gt; para converter novamente.`
  }
  </code></pre>