简体   繁体   中英

multi-line text-input

Is it possible to create a multi-line text-input field? I need something that works as a textarea (with line-wrap) but without being able to 'return' to the next line. Or should i create a textarea and disable the enter-button?

You can't do it without javascript. Check the second demo textarea in this tutorial , it does what you need.

继续进行最后的选择,我认为这是更好的方法。

Two simple constraints; text boxes can't have line returns & text areas can! You'll have to use a text area and handle "hard" returns either on the client using JS or the server using whatever language you're on. Just remember any client side parsing should be complimented on the server side if data integrity is important.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM