>웹 프론트엔드 >JS 튜토리얼 >jquery 모바일 노드 인스턴스

jquery 모바일 노드 인스턴스

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

이 글에서는 jquery 모바일 노드의 구현 방법을 주로 소개하는데, 주로 add() 메소드의 사용법을 다루고 있습니다. 구체적인 구현 방법은 다음과 같습니다.

메소드는 매우 편리하고 사용하기 간단합니다.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으로 문의하시기 바랍니다. 삭제