답변 2개
채택된 답변
+20 포인트
7년 전
ajax를 통해서 쉽게 불러올 수 있습니다.
Copy
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
$.ajax({
url : "div_page.php", // 불러올 파일명
success : function(result) {
var refine = $("#msg").html(result).find('div');
$('#msg').html(refine);
}
});
});
</script>
</head>
<body>
<span id="msg"></span>
</body>
file_get_content로 긁어온 소스를
제이쿼리의
$("셀렉터").html() //소스 전체 가져올때
$("셀렉터").text() //텍스트만 가져올때
로 추출하면 될것 같습니다. ~
답변을 작성하려면 로그인이 필요합니다.