title: How to Pass Selected Data from a Row of Table to Another Page Using JS
body: <p>I have a table containing information now i want to pass the information of a selected row to another page.For creating a link to another page i have made image as a link and now i want to pass the information of the row to another so that i can display selected image and it's information.Please help.
  <a href="https://i.stack.imgur.com/NK1az.png" rel="nofollow noreferrer">My table</a>. Suppose i click on first image so i want to pass the information of that particular to row to another page.</p>
  
  <p><strong>HTML AND JS</strong></p>
  
  <pre><code>&lt;table style="width:100%" id="ex-table"&gt;
          &lt;th&gt;Image&lt;/th&gt;
          &lt;th&gt;Name&lt;/th&gt;
          &lt;th&gt;Price&lt;/th&gt;
          &lt;th&gt;Category&lt;/th&gt;
          &lt;th&gt;Description&lt;/th&gt;
      &lt;script&gt;
      var fbRef = firebase.database().ref().child("Sell_Products");
  fbRef.on("child_added", snap =&gt; {
      var name = snap.child("name").val();
      var price = snap.child("price").val();
      var category = snap.child("category").val();
      var description = snap.child("description").val();
      var image = snap.child("image").val();
      $("#ex-table").append("&lt;tr&gt;&lt;td&gt;&lt;a href='auction.html'&gt;&lt;img src=" + image + "/img&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;" + name + "&lt;/td&gt;&lt;td&gt;" + price + "&lt;/td&gt;&lt;td&gt;" + category + "&lt;/td&gt;&lt;td&gt;" + description + "&lt;/td&gt;&lt;/tr&gt;" );
  });
  &lt;/script&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Thanks in advance </p>