title: How can I get parent id by onclick on a child in js?
body: <pre><code>    &lt;div id=&quot;rnd()&quot;&gt;&lt;button onclick=&quot;checkId()&quot;&gt;Click&lt;/button&gt;&lt;/div&gt;
  </code></pre>
  <p>I have a DIV when I make by DOM in JS and has a random ID, his child this button.</p>
  <p>I need at the click of a button I can know what the ID of the parent (DIV).</p>