HTML5中的新标签和新事件属性(Tags and Event Attributes)

<article> Defines an article
<aside> Defines content aside from the page content
<audio> Defines sound content
<bdi> Isolates a part of text that might be formatted in a different direction from other text outside it
<canvas> Used to draw graphics, on the fly, via scripting (usually JavaScript)
<command> Defines a command button that a user can invoke
<datalist> Specifies a list of pre-defined options for input controls
<details> Defines additional details that the user can view or hide
<embed> Defines a container for an external application or interactive content (a plug-in)
<figcaption> Defines a caption for a <figure> element
<figure> Specifies self-contained content
<footer> Defines a footer for a document or section
<header> Specifies an introduction, or a group of navigation elements for a document
<hgroup> Groups a set of <h1> to <h6> elements when a heading has multiple levels
<keygen> Defines a key-pair generator field (for forms)
<mark> Defines marked/highlighted text
<meter> Defines a scalar measurement within a known range (a gauge)
<nav> Defines navigation links
<output> Defines the result of a calculation
<progress> Represents the progress of a task
<rp> Defines what to show in browsers that do not support ruby annotations
<rt> Defines an explanation/pronunciation of characters (for East Asian typography)
<ruby> Defines a ruby annotation (for East Asian typography)
<section> Defines a section in a document
<source> Defines multiple media resources for media elements (<video> and <audio>)
<summary> Defines a visible heading for a <details> element
<time> Defines a date/time
<track> Defines text tracks for media elements (<video> and <audio>)
<video> Defines a video or movie
<wbr> Defines a possible line-break


[Window Event Attributes]
onafterprint scriptScript to be run after the document is printed
onbeforeprint scriptScript to be run before the document is printed
onbeforeonload scriptScript to be run before the document loads
onerror scriptScript to be run when an error occur
onhaschange scriptScript to be run when the document has changed
onmessage scriptScript to be run when the message is triggered
onoffline scriptScript to be run when the document goes offline
ononline scriptScript to be run when the document comes online
onpagehide scriptScript to be run when the window is hidden
onpageshow scriptScript to be run when the window becomes visible
onpopstate scriptScript to be run when the window's history changes
onredo script Script to be run when the document performs a redo
onresize scriptScript to be run when the window is resized
onstorage scriptScript to be run when the document loads
onundo script Script to be run when the document performs an undo
onunload scriptScript to be run when the user leaves the document


[Form Events]
oncontextmenu script Scriptto be run when a context menu is triggered
onformchange script Scriptto be run when a form changes
onforminput script Scriptto be run when a form gets user input
oninput script Script tobe run when an element gets user input
oninvalid script Script tobe run when an element is invalid


[Mouse Events]
ondrag script Script to berun when an element is dragged
ondragend script Script tobe run at the end of a drag operation
ondragenter script Scriptto be run when an element has been dragged to a valid drop target
ondragleave script Scriptto be run when an element leaves a valid drop target
ondragover script Scriptto be run when an element is being dragged over a valid drop target
ondragstart script Scriptto be run at the start of a drag operation
ondrop script Script to berun when dragged element is being dropped
onmousewheel script Scriptto be run when the mouse wheel is being rotated
onscroll script Script tobe run when an element's scrollbar is being scrolled


[Media Events]
oncanplay scriptScript to be run when a file is ready to start playing(when it has buffered enough to begin)
oncanplaythrough scriptScript to be run when a file can be played allthe way to the end without pausing for buffering
ondurationchange script Scriptto be run when the length of the media changes
onemptied script Script tobe run when something bad happens and the file is suddenly unavailable (likeunexpectedly disconnects)
onended script Script tobe run when the media has reach the end (a useful event for messages like"thanks for listening")
onerror script Script tobe run when an error occurs when the file is being loaded
onloadeddata scriptScript to be run when media data is loaded
onloadedmetadata scriptScript to be run when meta data (like dimensionsand duration) are loaded
onloadstart scriptScript to be run just as the file begins to loadbefore anything is actually loaded
onpause script Script tobe run when the media is paused either by the user or programmatically
onplay script Script to berun when the media is ready to start playing
onplaying script Script tobe run when the media actually has started playing
onprogress script Scriptto be run when the browser is in the process of getting the media data
onratechange script Scriptto be run each time the playback rate changes (like when a user switches to aslow motion or fast forward mode)
onreadystatechange script Scriptto be run each time the ready state changes (the ready state tracks the stateof the media data)
onseeked script Script tobe run when the seeking attribute is set to false indicating that seeking hasended
onseeking script Script tobe run when the seeking attribute is set to true indicating that seeking isactive
onstalled script Script tobe run when the browser is unable to fetch the media data for whatever reason
onsuspend scriptScript to be run when fetching the media data is stoppedbefore it is completely loaded for whatever reason
ontimeupdate scriptScript to be run when the playing position haschanged (like when the user fast forwards to a different point in the media)
onvolumechange scriptScript to be run each time the volume is changedwhich (includes setting the volume to "mute")
onwaiting scriptScript to be run when the media has paused but isexpected to resume (like when the media pauses to buffer more data)




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值