【发布时间】:2013-04-17 17:48:03
【问题描述】:
这是一个非常简单的形式,如下代码所示:
<form method="POST" action="news.php?nid=2">
<textarea id="txtcomment" style="width:100%; height: 70px;" maxlength="300"></textarea><br /><br />
<input type="submit" class="button" style="float: right; cursor:pointer;" value="Comment">
</form>
但在 news.php 中我无法获得“txtcomment”的值
echo $_POST['txtcomment'];
它什么也不返回...
【问题讨论】:
-
尝试将 textarea 的 name 属性设置为 txtcomment,而不仅仅是 id