title: Check-box - how to get the data in a row if the checkbox in a row is checked?
body: <p>I want to make a list of medicines and check all the medicines that I want to buy. I've thought of using a checkbox to check all the medicines that I wish to order then transfer the name of the medicine to the Javascript once the order button is clicked. </p>
  
  <p>I'm quite new to Javascript and jQuery so I'm not sure how to make this work. I've searched other codes but I can't find any that can be related to my problem. </p>
  
  <p>Here is the table code I made: </p>
  
  <pre><code> &lt;table id="example1" &gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;&lt;/th&gt;
              &lt;th&gt;Brand Name&lt;/th&gt;
              &lt;th&gt;Medicine Name &lt;/th&gt;
              &lt;th&gt;Price&lt;/th&gt;
  
  
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
  
  
          &lt;tr&gt;
              &lt;td style="width: 5px"&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;                                               
              &lt;td&gt;Xeloda&lt;/td&gt;
              &lt;td&gt; Capecitabine&lt;/td&gt;
              &lt;td&gt;$150 &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td style="width: 5px"&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;                                               
              &lt;td&gt;Camptosar&lt;/td&gt;
              &lt;td&gt;Irinotecan Hydrochloride&lt;/td&gt;
              &lt;td&gt;$200 &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td style="width: 5px"&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;                                               
              &lt;td&gt;Eloxatin&lt;/td&gt;
              &lt;td&gt;Oxaliplatin&lt;/td&gt;
              &lt;td&gt;$150 &lt;/td&gt;
          &lt;/tr&gt;
  
  
  
  
  &lt;/table&gt;
  &lt;input type="button" value="order" onclick="getAllMedicineNameOfCheckedBox()"/&gt;
  </code></pre>