HTML 5 <dialog> 標(biāo)簽
定義和用法
<dialog> 標(biāo)簽定義對(duì)話,比如交談。
HTML 4.01 與 HTML 5 之間的差異
<dialog> 標(biāo)簽是 HTML 5 中的新標(biāo)簽。
提示和注釋
提示:對(duì)話中的每個(gè)句子都必須屬于 <dt> 標(biāo)簽所定義的部分。請(qǐng)看下面的例子。
例子
<dialog> <dt>老師</dt> <dd>2+2 等于?</dd> <dt>學(xué)生</dt> <dd>4</dd> <dt>老師</dt> <dd>答對(duì)了!</dd> </dialog>
屬性
標(biāo)準(zhǔn)屬性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,請(qǐng)?jiān)L HTML 5 中標(biāo)準(zhǔn)屬性。
事件屬性
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
如需完整的描述,請(qǐng)?jiān)L HTML 5 中事件屬性。