<html>
<head>
<script type="text/javascript" src="jquery-1.4.1.js"></script>
<script type="text/javascript">
$("document").ready
(
function()
{
$("a").click(function(){
$('.hello').addClass('hello1');
});
}
);
</script>
<style type="text/css">
.hello
{
background-color: red;
}
.hello1
{
background-color: blue;
}
</style>
</head>
<body>
<a id="getajax" href="#" class="hello" >单击背景变蓝</a>
</body>
</html>