jquery实现改变显示的文字的背景色和字体大小

<html>
<head>

<script type="text/javascript" src=\'#\'" href="http://ajax.googleapis.com/ajax/libs">http://ajax.googleapis.com/ajax/libs
/jquery/1.4.0/jquery.min.js"></script>
</head>


<script type="text/javascript">
$(document).ready(function(){
  $("button").click(function(){
  $("p").css({"background-color":"red","font-size":"200%"});
  });
});
</script>
</head>

<body>
<h2>This is a heading</h2>
<p>我说.</p>
<p>你好.</p>
<button type="button">Click me</button>
</body>

</html>
 

你可能感兴趣的:(jquery)