jquery实现改变显示的文字的背景色和字体大小
更新:HHH   时间:2023-1-7


<html>
<head>

<script type="text/javascript" src="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>
<h3>This is a heading</h3>
<p>我说.</p>
<p>你好.</p>
<button type="button">Click me</button>
</body>

</html>
 

返回web开发教程...