-1

I have a 2 x 2 table on a webpage with different prices in it:

    <table id="table_15" border="1" class="OBJ-1">
    <col style="width:116px;">
    <col style="width:116px;">
    <tr style="height:59px;">
    <td class="TC-1">
    <p class="Normal"><span class="C-3">£40</span></p>
    </td>
    <td class="TC-1">
    <p class="Normal"><span class="C-3">£80</span></p>
    </td>
    </tr>
    <tr style="height:59px;">
    <td class="TC-1">
    <p class="Normal"><span class="C-3">£38</span></p>
    </td>
    <td class="TC-1">
    <p class="Normal"><span class="C-3">£58</span></p>
    </td>
    </tr>
    </table>

On loading a second webpage, is it possible to copy the data from row 2, column 1 (£38) and put it on that page?

Your assistance is much appreciated and please don't assume any prior knowledge on my part in replies.

cozza8
  • 21
  • 3
  • Try to use localStorage to set that data and get it in another page. But it will work if your pages in the same domain. – Tatul Mkrtchyan Mar 09 '21 at 15:53
  • Thank you for your reply and suggestion. Are you able to give the coding for that? – cozza8 Mar 09 '21 at 16:12
  • Does this answer your question? [Share data between html pages](https://stackoverflow.com/questions/11609376/share-data-between-html-pages) – ikiK Mar 09 '21 at 16:27

1 Answers1

0

Will work only in the same domain pages.

localStorage.setItem('price', 'Value of td'); // in the first page
localStorage.getItem('price'); // in the second page
Tatul Mkrtchyan
  • 361
  • 4
  • 8
  • That works if I type in my price of £38 for Value of td. Is there a way to link it to the cell in the table? – cozza8 Mar 09 '21 at 18:04