会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
先做事后做人
博客园
首页
新随笔
联系
订阅
管理
XHTML Essitials(3)-Attribute
7.XHTML Standard Attribute XHTML tags can have attributes. The special attributes for each tag are listed under each tag description. The attributes listed here are the core and language attributes that are standard for all tags (with a few exceptions). Core Attributes Not valid in base, head, html, meta, param, script, style, and title elements. Attribute Value Description class class_rule or style_rule The class of the element id id_name A unique id for the element style style_definition An inline style definition title tooltip_text A text to display in a tool tip Language Attributes Not valid in base, br, frame, frameset, hr, iframe, param, and script elements. Attribute Value Description dir ltr | rtl Sets the text direction lang language_code Sets the language code Keyboard Attributes Attribute Value Description accesskey character Sets a keyboard shortcut to access an element tabindex number Sets the tab order of an element 8.XHTML Event Attributes New to HTML 4.0 was the ability to let HTML events trigger actions in the browser, like starting a JavaScript when a user clicks on an HTML element. Below is a list of attributes that can be inserted into HTML tags to define event actions. If you want to learn more about programming with these events, you should study our JavaScript tutorial and our DHTML tutorial. Window Events Only valid in body and frameset elements Attribute Value Description onload script Script to be run when a document loads onunload script Script to be run when a document unloads Form Element Events Only valid in form elements. Attribute Value Description onchange script Script to be run when the element changes onsubmit script Script to be run when the form is submitted onreset script Script to be run when the form is reset onselect script Script to be run when the element is selected onblur script Script to be run when the element loses focus onfocus script Script to be run when the element gets focus Keyboard Events Not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements. Attribute Value Description onkeydown script What to do when key is pressed onkeypress script What to do when key is pressed and released onkeyup script What to do when key is released Mouse Events Not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements. Attribute Value Description onclick script What to do on a mouse click ondblclick script What to do on a mouse doubleclick onmousedown script What to do when mouse button is pressed onmousemove script What to do when mouse pointer moves onmouseover script What to do when mouse pointer moves over an element onmouseout script What to do when mouse pointer moves out of an element onmouseup script What to do when mouse button is released
posted on
2006-04-13 12:25
asdfasdf
阅读(
170
) 评论(
0
)
收藏
举报
刷新页面
返回顶部
博客园
© 2004-2025
浙公网安备 33010602011771号
浙ICP备2021040463号-3