简体   繁体   中英

how can I allow a user to write something into a text box with html or javascript?

I am a beginner programmer and I want to allow someone using my program to be able to type a key on the keyboard and have it be typed out on the screen, but I want it to be normal typing that you can copy and paste and do everything a normal typing function can do. I haven't tried anything because I couldn't think of any ideas for what to do

For this you simply do a textarea tag like so. More info about this can be found on https://www.w3schools.com/tags/tag_textarea.asp and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

 <textarea rows="4" cols="50"> Type here </textarea>

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