日期:2014-05-17  浏览次数:20660 次

jquery 修改css
<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>

?