Textarea值未与表单一起发布

编程入门 行业动态 更新时间:2024-10-25 00:35:37
本文介绍了Textarea值未与表单一起发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

提交表格时,我试图输入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值未与表单一起发布

本文发布于:2023-11-26 08:14:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1633331.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表单   Textarea

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!