How to lock the first word of a textarea?

☆樱花仙子☆ 提交于 2019-12-01 18:09:25

If you just want the textarea to show a prefix, you can use a label, change the position, and indent the textarea content. User will not notice the difference.

You can see how it works here: http://jsfiddle.net/FLEA3/.

How about just putting this word as a label next to the textbox? It may be confusing for the users not to be able to edit part of the text in the textbox.

Wouldn't it be better if you just alert the user that whatever he inputs in the textarea will be submitted with a "prefix" and then

  • show the prefix as a label before the textarea
  • add the prefix to the inputted text before submitting
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!