简体   繁体   English

我们可以用于消息 function 的按钮类型是什么?

[英]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.

相关问题 如果我们使用类型为提交的多功能按钮标记HTML会发生什么? - What happens if we use mulptile button tags HTML with type as submit 我们可以在同一个点击函数中同时使用类名和输入类型名吗 - can we use both class name and input type name in the same click function 我们可以在php中使用html按钮onclick事件吗? - can we use html button onclick event inside php? 我们可以通过单击 html 的浏览打开按钮来调用 javascript function 吗? - can we call a javascript function by clicking open button of browse of html? 当我们输入输入时,我们如何打开单选按钮 - How can we turn radio button checked when we type its input 我们可以在隐藏类型字段的值字段中给函数返回值吗? - Can we give function return in value field in hidden type field? 我们可以在 Vue.js 中使用 jquery onscroll 函数吗? - Can We use jquery onscroll function in Vue.js? 我们可以在jQuery HTML函数中使用angularJS字符串插值({{}})吗? - Can we use angularJS string interpolation ( {{}}) in jquery html function 我们如何创建一个按钮,它运行我们给定的功能并接受给定的输入并执行我们给定的任务? - How can we create a button, that runs the function we have given and takes the input given and performs tasks that we have given? 什么是默认按钮类型? - What is the default button type?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM