简体   繁体   中英

How does Facebook comment box work without input tag?

I was inspecting facebook's comment box and it was surprising to me that there is no input tag, just a lot of nested div.

Anyone with the knowledge on how it's being implemented and why is that a better approach than a simple input tag?

here the screen screenshot of me inspecting the comment box

thank you in advance

Hopefully its contenteditable , Obviously with some script, validations, programming ...

 div { width: 100%; max-width: 250px; padding: 5px 10px; border: 1px solid #666; outline: 0; border-radius: 10px; } 
 <div contenteditable="true">Am I a input ???</div> 

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