Javascript编程小结(3 css property, Event...)
2007-01-17 17:44
621 查看
DHTML: Scripting CSS Styles
Property | Description/Values |
position | How the element is positioned. absolute, relative, fixed, or static (the default). |
left, top | The X and Y coordinates of the left and top edges of the element. |
width | The width of the element. |
height | The height of the element. |
zIndex | The stacking order. Values are integers; higher values are drawn on top of lower values. |
display | How to display the element. Common values are block, inline, and none for elements that don't get laid out at all. |
visibility | Whether the element is visible or hidden. Space is still allocated for non-positioned hidden elements. |
overflow | What to do when element content exceeds element size. Values: visible (content overflows); hidden (excess content hidden); scroll (display permanent scrollbar); auto (scrollbars only when needed). |
clip | What portion of element content to display. Syntax: rect(top right bottom left). |
常用的一些Event
Handler | Supported by/Triggered when |
onabort | <img>; image load aborted |
onblur | <body> and form elements; window or element loses keyboard focus |
onchange | Form elements; displayed value changes |
onclick | All elements; mouse press and release; return false to cancel |
ondblclick | All elements; mouse double-click |
onerror | <img>; image loading fails |
onfocus | <body> and form elements; window or element gets keyboard focus |
onkeydown | <body> and form elements; key pressed; return false to cancel |
onkeypress | <body> and form elements; key pressed and released; return false to cancel |
onkeyup | <body> and form elements; key released |
onload | <body>, <frameset>, <img>, <iframe>, <object>; document, image, or object completely loaded |
onmousedown | All elements; mouse button pressed |
onmousemove | All elements; mouse pointer moved |
onmouseout | All elements; mouse moves off element |
onmouseover | All elements; mouse moves over element; return true to prevent link URL display in status bar |
onmouseup | All elements; mouse button released |
onreset | <form>; form reset requested; return false to prevent reset |
onresize | <body>, <frameset>; window size changes |
onsubmit | <form>; form submission requested; return false to prevent submission |
onunload | <body>, <frameset>; document unloaded |
<input type="button" value="Press Me"
onclick="alert('Hello World!');">
<form action="javascript:void validate( )">
html id内的文本内容:
<li id="DT" onclick="changeText()">您好吗? </li>
<script language="JavaScript">
function changeText()
{
DT.innerText="我很好!";
}//function
</script>
改变文本使用属性:innerText,outerText,innerHTML,outerHTML
JavaScript API Reference:
http://www.leftworld.net/online/JavaScriptP/jscriptpr2-CHP-1-SECT-1.1.html http://www.leftworld.net/online/JavaScriptP/index.html
相关文章推荐
- javascript与dom编程(二)Event
- JavaScript高级编程小结
- javaScript事件学习小结(四)event的公共成员(属性和方法)
- 韩顺平 javascript教学视频_学习笔记27_dom对象(window对象3.history.location.navigator.screen.event)_js事件驱动编程
- javascript编程异常处理实例小结
- Javascript编程小结(1通用对象)
- Javascript编程小结(2 XML对象)
- javascript编程异常处理实例小结
- javascript 编程调试方法小结
- [JavaScript]addLoadEvent方法--摘自<JavaScript+DOM编程艺术>
- Javascript模块化编程学习小结
- Javascript模块化编程(一):模块的写法【转】
- JavaScript(十八) Dom Event 一
- Javascript模块化编程(三):require.js的用法
- javascript iframe编程相关代码
- javascript 变量,作用域,内存管理小结
- 用面向对象的编程方式写JavaScript
- JavaScript必知必会小结(《JQuery实战》)
- JAVASCRIPT作为功能编程介绍,看看对你有没有帮助
- JavaScript运算符优先级,逻辑表达式,等于全等于,序列检测小结