This article mainly introduces the method of jQuery to simply bind a single event. It analyzes the related operation skills of jQuery using the bind method for event binding and event response based on specific examples. Friends who need it can Refer to the following
The example of this article describes how jQuery simply binds a single event. Share it with everyone for your reference, the details are as follows:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>绑定单个事件</title> <script type="text/javascript" src="jquery-1.7.2.min.js"></script> <script language="JavaScript"> $(document).ready(function () { $("input[name=event_1]").bind({ mouseover:function () { $("ul").css("display","none"); }, mouseout:function () { $("ul").css("display","block"); } }); }); </script> </head> <body> <h1>壹基金</h1> <h2>简介</h2> <p>2007年,李连杰先生创立启动了壹基金。深圳壹基金公益基金会2010年12月3日再深圳注册成立,是中国第一家民间公募基金会。</p> <h2>战略及策略</h2> <p>壹基金的公益愿景为"尽我所能,人人公益"。壹基金战略模式为"一个平台+三个领域",即搭建专业透明的壹基金公益平台。</p> <h2>公益活动</h2> <ul> <li>为爱同行</li> <li>关注自闭儿童</li> <li>雅安地震救援</li> </ul> <input name="event_1" type="button" value="绑定单个事件" /> </body> </html>
The above is the detailed content of jQuery related knowledge about binding events. For more information, please follow other related articles on the PHP Chinese website!