How do I create a scrollable textbox?

后端 未结 2 1150
情话喂你
情话喂你 2021-01-17 14:11

Currently, the site has the following css class that is intended to be used for note (longer texts) entries in a form.

.scrollabletextbox {
    height:100px         


        
相关标签:
2条回答
  • 2021-01-17 14:33

    Try replacing input type="text" with textarea tag.

    Change your code to:

    <textarea class="scrollabletextbox" name="note">
      <?php echo $note; ?>
    </textarea>
    

    It sends data just as a normal input tag, so you can get data from it with the same methods.

    Read more info about textarea tag

    0 讨论(0)
  • 2021-01-17 14:38

    I would switch the control from an input to a textarea, which will perform the functionality you request by default.

    <textarea class="scrollabletextbox" name="note"><?php echo $note; ?></textarea>
    

    JSFIDDLE: http://jsfiddle.net/rJy94/

    0 讨论(0)
提交回复
热议问题