[英]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. 我正在检查Facebook的注释框,令我惊讶的是,没有输入标签,只有很多嵌套的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 ... 希望它的
contenteditable
,显然带有一些脚本,验证,编程...
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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.