JQuery——事件的绑定和移除

1.单事件绑定

JQuery——事件的绑定和移除

<script type="text/javascript">
	$(function(){
		$("input[name=event_1]").bind("click",function(){
			$("p").css("background-color","#F30");
		});
	});
</script>

2.多事件的绑定

JQuery——事件的绑定和移除

<script type="text/javascript">
	$(function(){
		$("input[name=event_1]").bind({
			mouseover:function(){
				$("ul").css("display","none");
			},
			mouseout:function(){
				$("ul").css("display","block");
			}
		});
	});
</script>

3.事件的移除

JQuery——事件的绑定和移除

相关文章:

  • 2022-03-04
  • 2022-01-11
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
相关资源
相似解决方案