是否可以从动态HTML表中读取值并将其传递给输入表单? [关闭]

I'm using on WordPress an amazing tablepress plugin and I have a table on one page that I want to read and pass the value of the table to an input form. The table is the result of a search and will be always a row and a column, just one number. There is any way to do that with PHP or javascript? Or any other way?

I will share some code of the result in the page...

Thanks in advance!

<table id="tablepress-1" class="tablepress tablepress-id-1">
<tbody>
<tr class="row-1">
    <td class="column-1">319</td>
</tr>
</tbody>
</table>

You probably have jquery available...if so:

var fromTable = $("#tablepress-1 tr td").text() will give you the value you want.

You can do something similar to put it into your form:

$("#myInputField").text(fromTable)

And if you don't have jQuery, but you KNOW the tables you can get the value like this:

var fromTable = document.getElementById("tablepress-1").rows[0].cells[0].inn‌​erText

(Consider all of this pseudo-code and fix it up to suit your situation. The debugger is your friend!)