DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>title>
head>
<body>
<p>this is pp>
<button type="button">clickbutton>
<script type="text/javascript" src="jquery.js">script>
<script type="text/javascript" src="jQ_select.js">
script>
body>
html>
//选取元素 $(selector).action
// $("p") 选取p元素
// $("p.className") 选择class=“className”的p
// $("p.#id")
// $("[href]") 带有href属性的元素
// $("[href='#']") 属性等于#的元素
// $("[href$='.jpg']") 选取所有 href 值以 ".jpg" 结尾的元素。
//文档就绪函数
$(document).ready(function(){
$("button").click(function(){
$("p").css("background-color","red");
});
});
//事件
// $(selector).dblclick(function) 触发或将函数绑定到被选元素的双击事件
// $(selector).focus(function) 触发或将函数绑定到被选元素的获得焦点事件
// $(selector).mouseover(function) 触发或将函数绑定到被选元素的鼠标悬停事件