title: Displaying the content of an input for several divs
body: <p>I want to give all .firstname-show the content from the input but I don't know how to do it. Here's code:</p>
  
  <pre><code>    &lt;input type="text" id="firstname" name="firstname" placeholder="First name"&gt;
      &lt;button id="firstname-btn" onclick="show()"&gt;SHOW&lt;/button&gt;
      &lt;div class="firstname-show"&gt;&lt;/div&gt;
      &lt;div class="firstname-show"&gt;&lt;/div&gt;
  </code></pre>
  
  <pre><code>    function show() {
         var name = document.getElementById('firstname').value;
         document.querySelectorAll('.firstname-show').textContent = name;
      }
  </code></pre>