<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script src="jquery-1.4.1.js" ></script>
<title>无标题文档</title>
</head>
<script>
$(document).ready(function() {
$("a").click(function(){
alert("Hello world!");
});
$("p").click(function(){
alert("Hef Jquery") ;
}) ;
});
</script>
<a href="Hello World Jquery">Hello World Jquery</a>
<p>hef</p>
<body>
</body>
</html>
本文通过一个简单的示例介绍了如何利用jQuery库简化HTML页面上的事件处理过程,包括为链接和段落元素添加点击事件。

被折叠的 条评论
为什么被折叠?



