html5如何创建按钮button

HTML 5

定义和用法

HTML 4.01 与 HTML 5 之间的差异

在 HTML 5 中有一个新属性:autofocus。

例子:

属性

属性 描述 4 5
autofocus true | false 在页面加载时,是否让按钮获得焦点。   5
disabled disabled 禁用按钮 4 5
name button_name 为按钮规定为一的名称。 4 5
type
  • button
  • reset
  • submit
定义按钮的类型。 4 5
value some_value 为按钮规定初始值。该值可通过脚本改变。 4 5

标准属性

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, 
lang, ref, registrationmark, tabindex, template, title

如需完整的描述,请访 HTML 5 中标准属性。

事件属性

onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, 
ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, 
ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, 
onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, 
onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload


你可能感兴趣的:(html学习笔记)