手记

jquery 添加Html内容

<html>
<head>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs
/jquery/1.4.0/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("button").click(function(){
  $("p").append("逗你玩");
  });
});
</script>
</head>

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

</html>
 

0人推荐
随时随地看视频
慕课网APP