[英]What is the button type we can use for message function?
I want to use a <button>
in a website for a messaging function.我想在网站中使用<button>
来发送消息 function。
However I am confused with the type of button which I should use.但是,我对应该使用的按钮类型感到困惑。 As whether I should use submit, reset or else can I use <input>
instead of a <button>
?至于我应该使用提交、重置还是可以使用<input>
而不是<button>
?
If you are talking about just a button to submit a form or within a live chat using submit would be perfectly fine!如果您只是在谈论提交表单的按钮或在实时聊天中使用提交将非常好!
To have a button in your website, be it for a messaging function or not, both the <input type="button">
and the <button>
tags can be used.要在您的网站上有一个按钮,无论是否用于消息 function, <input type="button">
和<button>
标签都可以使用。 The difference between the two tags is that the <button>
tag can hold content such as images and text, whereas, with the <input>
approach, you cannot (as it is a null element, an empty element, you could say).这两个标签之间的区别在于<button>
标签可以保存诸如图像和文本之类的内容,而使用<input>
方法则不能(因为它是一个 null 元素,可以说是一个空元素)。
Hope this helps!希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.