文本框事件

来源:互联网 发布:淘宝不能交保证金 编辑:程序博客网 时间:2024/05/22 10:47
 <body onLoad="alert('加载事件')" onSubmit=alert('表单提交')>
<form>
<input type="text" id="" value="123" size="15" onChange="alert('内容改变')">
<input type="button" id="" value="计算" onClick=alert('这是我的事件')>
<input type="text" id="" value="我获得焦点了" size="15" onFocus="alert('我获得焦点了')">
<input type="text" id="" value="我失去焦点了" size="15" onBlur="alert('我失去焦点了')">
<input type="text" id="" value="鼠标悬停事件"size="15"onMouseOver="alert('鼠标悬停事件')">
<input type="text" id="" value="鼠标移出事件" size="15"onMouseOut="alert('鼠标移出事件')">
<input type="text" id="" value="鼠标移动事件"size="15"onMouseMove="alert('鼠标移动事件')">
<input type="button" id="" value="点击" onMouseDown=alert('鼠标按下事件')>
<input type="button" id="" value="点击" onMouseUp=alert('鼠标弹起事件')>
<input type="submit" id="" value="提交" onSubmit=alert('表单提交')>
</form>
</body>
原创粉丝点击