码迷,mamicode.com
首页 > Web开发 > 详细

2014.12.25 jQuery学习笔记

时间:2014-12-25 16:02:17      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:

jQuery 事件函数

jQuery 事件处理方法是 jQuery 中的核心函数。

事件处理程序指的是当 HTML 中发生某些事件时所调用的方法。术语由事件“触发”(或“激发”)经常会被使用。

通常会把 jQuery 代码放到 <head>部分的事件处理方法中:

 

<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p#hello").hide();
});
});
</script>
</head>

<body>
<h2>This is a heading</h2>
<p id="hello">This is a paragraph.</p>
<p>This is another paragraph.</p>
<button type="button">Click me</button>
</body>
</html> 

  

2014.12.25 jQuery学习笔记

标签:

原文地址:http://www.cnblogs.com/azhui2014/p/4184794.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!