title: How to get text content of one h3 at a time in javascript?
body: <p>I am having difficulty to get text content of h1 at a time when I click on any button element . Can anyone help me out please?     </p>
  
  <pre><code>    &lt;div id="makeSelection" &gt;&lt;h1&gt;Text Content 1&lt;/h1&gt;
      &lt;button onclick="eveent()"&gt;Click Me&lt;/button&gt;
      &lt;/div&gt;
      &lt;div id="makeSelection" &gt;&lt;h1&gt;Text Content 2&lt;/h1&gt;
          &lt;button onclick="eveent()"&gt;Click Me&lt;/button&gt;
      &lt;/div&gt;
      &lt;div id="makeSelection" &gt;&lt;h1&gt;Text Content 3&lt;/h1&gt;
          &lt;button onclick="eveent()"&gt;Click Me&lt;/button&gt;
      &lt;/div&gt;
  
  
       function eveent(){
  
          var text = document.getElementById('makeSelection').textContent;
  
          console.log(text);
  
  
  
                      }
  </code></pre>