title: How can I getElementByID with dynamic ID values?
body: <p>I have a problem to <code>getElementById</code> of dynamic IDs. I need this value to make a random calculation of different elements.</p>
  
  <p><strong>MY CODE</strong></p>
  
  <pre><code>&lt;div class="col-lg-4" v-for="dado in dados"&gt;
    &lt;button class="btn btn-outline-danger" @click="rolagemD20"&gt;
        &lt;p&gt;{{dado.nome}}&lt;/p&gt;
        &lt;p v-bind:id="dado.nome"&gt;?&lt;/p&gt;
    &lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>MY FUNCTION:</strong></p>
  
  <p>In these methods, I will get the ID and compare with the value, making different calculations for each ID</p>
  
  <pre><code>&lt;script&gt;
          new Vue({
              el: '#app',
              data: {
                  dados: [
                      { nome: 'D4' },
                      { nome: 'D6' },
                      { nome: 'D8' },
                      { nome: 'D10' },
                      { nome: 'D12' },
                      { nome: 'D20' }
                  ]
              },
              methods: {
                  rolagemD20: function () {
                      var valorAleatorio = Math.floor(Math.random() * 20 + 1)
                      console.log(valorAleatorio)
                      document.getElementsById("").innerHTML = valorAleatorio
                  }
              }
          })
      &lt;/script&gt;
  </code></pre>