提交表格时,我试图输入textarea标签:
I'm trying to input a textarea tag when I submit my form:
<textarea id="confirmationText" class="text" cols="86" rows ="20" name="confirmationText" form="confirmationForm"></textarea> <form action="sendConfirmation.php" name="confirmationForm" method="post"> <input type="submit" value="Email" class="submitButton"> </form>如您所见,我已经在我的textarea标记中设置了form ="confirmationForm"属性.我已经使用Live HTTP Headers来捕获POST请求,并且它是空的(所以我知道问题不在sendConfirmation.php中,问题是确认文本没有被发布).我已经搜索了网,并据我所知正确地设置了它.
As you can see I've set the form="confirmationForm" attribute in my textarea tag. I've used Live HTTP Headers to catch the POST request and it is empty (so I know the problem is not in sendConfirmation.php, the problem is that the confirmationText is not being POSTed). I've searched the net and as far as I can see I've set it correctly.
推荐答案尝试按如下所示将其放入表单标签中……应该可以使用
try to put it inside the form tag as follows... it should work
<form action="sendConfirmation.php" name="confirmationForm" method="post"> <textarea id="confirmationText" class="text" cols="86" rows ="20" name="confirmationText"></textarea> <input type="submit" value="Email" class="submitButton"> </form>但是您也可以使用相同的方法,但是您需要提供from id属性,然后
however you can use the same approach as well but you need to provide the from id attribute then
<form action="sendConfirmation.php" id="confirmationForm" method="post"> <input type="submit" value="Email" class="submitButton"> </form>更多推荐
Textarea值未与表单一起发布
发布评论