你如何在HTML5中提交提交按钮? [英] How do you make a submit button in HTML5?

查看:184
本文介绍了你如何在HTML5中提交提交按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

鉴于 W3C的HTML5规范提交按钮


一个按钮元素必须同时包含一个开始标记和一个结束标记。

A button element must have both a start tag and an end tag.

带有开始和结束标记的提交按钮的示例是什么?

what's an example of a submit button with a start and end tag?


  1. < button type =submit>

  2. < button type =submit/>

  3. < button type =submit>< / button>

  4. 2&3

  5. 以上都不是

  1. <button type="submit">
  2. <button type="submit" />
  3. <button type="submit" ></button>
  4. 2 & 3
  5. None of the above

其他答案是否相同singleton标签,例如< input> < img>

Is the answer the same for other "singleton" tags, like <input> or <img>?

推荐答案

<button type="submit">Click me</button>

W3C MDN 有更多信息。

这篇关于你如何在HTML5中提交提交按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆