>  기사  >  웹 프론트엔드  >  jquery移动节点实例

jquery移动节点实例

PHPz
PHPz앞으로
2016-05-16 16:20:041435검색

这篇文章主要介绍了jquery移动节点的实现方法,主要涉及append()方法的使用技巧,需要的朋友可以参考下,具体实现方法如下:

方法很方便简单,使用 append()方法即可。代码如下:

<html>
<head>
<title>jquery移动节点</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="jquery-1.8.2.min.js"></script>
<script type="text/javascript">
 $(function(){
  $("button").click(function(){
   $("p").append($("p"));
  });
 });
</script>
<style type="text/css">
h5{color:blue;}
p{width:300px;height:60px;border:solid 1px green;}
p p{color:red;}
</style>
</head>
<body>
<h5>jquery移动节点</h5>
<button>点我</button>
<p>哈哈哈哈哈哈,太搞笑了</p>
<p>你太幽默了</p>
</body>
</html>

以上就是本章的全部内容,更多相关教程请访问jQuery视频教程

성명:
이 기사는 jb51.net에서 복제됩니다. 침해가 있는 경우 admin@php.cn으로 문의하시기 바랍니다. 삭제