<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8"/>
<title>匿名按钮</title>
</head>
<body>
<form name = "匿名按钮" method = "post" action = "">
<input type = "text"/>
<button type = "button">C语言课程</button>
</form>
</body>
</html>
匿名按钮button:
没有自动生效的按钮,但是可以使用 JavaScript 代码进行定制。
如果你省略了 type 属性,那么这就是默认值。
不管使用的是 <button> 元素还是 <input> 元素,按钮的行为都是一样的。
<button> 元素允许你使用 HTML 内容作为其标记内容,但 <input> 元素只接受纯文本内容。
使用 <button> 元素,可以有一个不同于按钮标签的值 通过将其设置为 value 属性。
但是在 IE 8 之前的版本中是不行的。
button 指定按钮没有特定的语义意义
<button type="button">C语言课程</button>
提示:请始终为 <button> 元素规定 type 属性。不同的浏览器对 <button> 元素的 type 属性使用不同的默认值。
<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8"/>
<title>匿名按钮</title>
</head>
<body>
<form name = "匿名按钮" method = "post" action = "">
<input type = "text"/>
<button>C语言课程</button>
</form>
</body>
</html>
匿名按钮button:
没有自动生效的按钮,但是可以使用 JavaScript 代码进行定制。
如果你省略了 type 属性,那么这就是默认值。
不管使用的是 <button> 元素还是 <input> 元素,按钮的行为都是一样的。
&