HTML onmouseup 事件属性HTML 事件属性实例当在段落上松开鼠标按钮时执行 JavaScript:<p onmouseup="mouseUp()">Click the text!</p> 完整实例【亲自试一试】:<!DOCTYPE html
HTML onmouseover 事件属性HTML 事件属性实例当鼠标指针移动到图像上时执行一段 JavaScript:<img onmouseover="bigImg(this)" src="smiley.gif" alt="Smiley">浏览器支持
HTML onmouseout 事件属性HTML 事件属性实例当鼠标指针移动到图像之外时执行一段 JavaScript:<img onmouseout="normalImg(this)" src="smiley.gif" alt="Smiley">浏览器支持
HTML onmousemove 事件属性HTML 事件属性实例当鼠标指针移动到图像上时执行一段 JavaScript:<img onmousemove="bigImg(this)" src="smiley.gif" alt="Smiley">浏览器支持
HTML onmousedown 事件属性HTML 事件属性实例当在段落上按下鼠标按钮时执行一段 JavaScript:<p onmousedown="mouseDown()">请点击此文本!</p>浏览器支持 IE Firefox
HTML ondblclick 事件属性HTML 事件属性实例当双击鼠标按钮时执行一段 JavaScript:<button ondblclick="copyText()">Copy Text</button>浏览器支持 IE Firefox Chr
HTML onclick 事件属性HTML 事件属性实例当点击按钮时执行一段 JavaScript:<button onclick="copyText()">Copy Text</button>浏览器支持 IE Firefox Chrome Safa
HTML onkeyup 事件属性HTML 事件属性实例当用户放松按键时执行一段 JavaScript:<input type="text" onkeyup="displayResult()">浏览器支持 IE Firefox Chrome Sa
HTML onkeypress 事件属性HTML 事件属性实例当用户按键时执行一段 JavaScript:<input type="text" onkeypress="displayResult()">浏览器支持 IE Firefox Chrome
HTML onkeydown 事件属性HTML 事件属性实例当用户按键时执行一段 JavaScript:<input type="text" onkeydown="displayResult()">浏览器支持 IE Firefox Chrome Sa
HTML onsubmit 事件属性HTML 事件属性实例当提交表单时执行一段 JavaScript:<form action="demo_form.php" onsubmit="checkForm()">浏览器支持 IE Firefox Chrome
HTML onselect 事件属性HTML 事件属性实例当 <input> 元素内的文本被选中后执行一段 JavaScript:<input type="text" onselect="showMsg() value="Hello world!">浏览器支持
HTML onfocus 事件属性HTML 事件属性实例当输入字段获得焦点时执行 JavaScript:<input type="text" id="fname" onfocus="setStyle(this.id)">浏览器支持 IE Firefox
HTML onchange 事件属性HTML 事件属性实例当值改变时检查输入字段:<input type="text" name="txt" value="Hello" onchange="checkField(this.value)">浏览器支持 IE
HTML onblur 事件属性HTML 事件属性实例当用户离开输入字段时对其进行验证:<input type="text" name="fname" id="fname" onblur="upperCase()">浏览器支持 IE Firefo