drduh44480 2009-12-18 23:45
浏览 132
已采纳

HTML中的MultiLine表单?

I'm trying to get some input from a user and use that input in a php script. Right now I have a form tag, from the little I understand, this cannot have multiline input. The solution seems to be a TextArea, however I'm not sure how to get the input from a TextArea.

Here's my code with the form :

<form action="traitement_cmd.php" method="post" >
    Enter Cmd: <input type="text" size="100" maxlength="100" name="cmd"/>
</form>

The textarea tag doesn't seem to have the same attributes as a form tag, so I'm not sure how I should change my code. I also need a button for the user to click to send his input to the php script.

How can I change my code to do this ?

Thank you.

  • 写回答

3条回答 默认 最新

  • dqz30992 2009-12-18 23:49
    关注

    You can just put the textarea inside the form, and the submit button too:

    <form action="traitement_cmd.php" method="post" >
            Enter Cmd: <textarea rows="5" cols="80" name="cmd"></textarea>
            <input type="submit" value="Submit"/>
    </form>

    </div>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计