47、实例 使用jQuery管理事件之事件切换

来源:互联网 发布:智能电表怎么传输数据 编辑:程序博客网 时间:2024/05/16 06:20
<!doctype html><html><head><meta charset="utf-8"><title>使用jQuery管理事件之事件切换</title><script type="text/javascript" src="jquery-2.1.0.js"></script><script>$(function(){$("#btn1").toggle(//暂时测试失败,显隐成功function(){$(this).text("第一次单击");},function(){$(this).text("第二次单击");});$("div").hover(function(event){$("#btn2").text("mouseover");},function(event){$("#btn2").text("mouseout");});});</script></head><body><button id="btn1">点击</button><div style="border:solid 1px red;"><button id="btn2">状态</button></div></body></html>

0 0
原创粉丝点击