我們能夠得到<td>
內的名稱的價值?PHP得到名稱<td name="x">與郵政
代碼
<form action='' method='post'>
<table>
<tr>
<td name='read_recordid'>VALUE</td>
</tr>
</table>
</form>
使用後獲得的價值
if ($_POST['read_recordid']) {
//do something
}
我們能夠得到<td>
內的名稱的價值?PHP得到名稱<td name="x">與郵政
代碼
<form action='' method='post'>
<table>
<tr>
<td name='read_recordid'>VALUE</td>
</tr>
</table>
</form>
使用後獲得的價值
if ($_POST['read_recordid']) {
//do something
}
使用
在<td id="id_name"> </td>
接取該ID使用Javascript
<input type="hidden" name="read_recordid" value=""/>
或 使用ID並張貼到php代碼。
<script type="text/javascript">
var x= document.getElementById("id_name"').value;
</script>
不,你不能。我們必須用輸入選擇等 可能是你正在尋找類似
<input type="hidden" name="read_recordid" value="VALUE"/>
所以如果我想要一個特定的值,我只能使用輸入並從輸入中獲取名稱? – aaa
您可以使用輸入,選擇,文本區或按鈕。 –
提交表單只提交某些字段(即input,select,textarea和button)。表格數據單元格未提交。 – apokryfos