리자

플리커 이미지 랜덤 출력하기

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
 
  <script>
  $(document).ready(function(){
    var page = Math.round(Math.random() * 2000);
    $.getJSON("http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=자신의 API KEY&text=cat,pet&per_page=1&page="+page+"&machine_tag_mode=all&format=json&jsoncallback=?",

        function(data){
            $("<img/>")
                .attr("id", "flickr")
                .attr("border", "0px")
                .attr("src", "http://farm"+data.photos.photo[0].farm+".static.flickr.com/"+data.photos.photo[0].server+"/"+data.photos.photo[0].id+"_"+data.photos.photo[0].secret+"_m.jpg")
                .appendTo("#images");
            $("#flickr").wrap("<a href='http://www.flickr.com/photos/"+data.photos.photo[0].owner+"/"+data.photos.photo[0].id+"' target='_blank'></a>");
        });
  });
  </script>
</head>
<body>
  <div id="images">
  </div>
</body>
</html>


&text= 컴마로 구분하여 출력하고 싶은 사진의 이름을 입력하면 됩니다. (영문)

[이 게시물은 관리자님에 의해 2011-10-31 16:55:28 jQuery에서 이동 됨]
|

댓글 5개

오오.. 굳..
오오오오오오 원하던거~~
좋은 정보 감사합니다. ^^
오오~ 좋은 정보 고맙습니다.~~
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
15년 전 조회 4,837
15년 전 조회 1,950
15년 전 조회 2,234
15년 전 조회 2,213
15년 전 조회 2,214
15년 전 조회 1,692
15년 전 조회 1,943
15년 전 조회 2,067
15년 전 조회 2,022
15년 전 조회 2,716
15년 전 조회 1,863
15년 전 조회 1,973
15년 전 조회 1,464
15년 전 조회 1,574
15년 전 조회 1,565
15년 전 조회 1,496
15년 전 조회 1,462
15년 전 조회 1,499
15년 전 조회 1,651
15년 전 조회 1,676
15년 전 조회 3,186
15년 전 조회 1,511
15년 전 조회 2,164
15년 전 조회 2,019
15년 전 조회 2,179
15년 전 조회 1,888
15년 전 조회 2,387
15년 전 조회 1,195
15년 전 조회 1,670
15년 전 조회 1,642
15년 전 조회 3,441
15년 전 조회 3,778
15년 전 조회 2,470
15년 전 조회 1,919
15년 전 조회 2,556
15년 전 조회 2,034
15년 전 조회 1,657
15년 전 조회 4,344
15년 전 조회 1,996
15년 전 조회 2,089
15년 전 조회 3,345
15년 전 조회 2,047
15년 전 조회 4,742
15년 전 조회 2,931
15년 전 조회 3,738
15년 전 조회 2,344
15년 전 조회 2,581
15년 전 조회 1,878
16년 전 조회 4,930
16년 전 조회 4,553
16년 전 조회 4,342
16년 전 조회 5,766
16년 전 조회 3,989
16년 전 조회 2,344
16년 전 조회 2,327
16년 전 조회 2,462
16년 전 조회 2,150
16년 전 조회 4,593
16년 전 조회 3,495
16년 전 조회 2,653
16년 전 조회 2,254
16년 전 조회 2,440
16년 전 조회 2,954
16년 전 조회 2,042
16년 전 조회 2,963
16년 전 조회 2,288
16년 전 조회 2,415
16년 전 조회 2,035
16년 전 조회 2,746
16년 전 조회 2,070
16년 전 조회 2,493
16년 전 조회 2,670
16년 전 조회 1,743
16년 전 조회 1,806
16년 전 조회 2,468
16년 전 조회 5,889
16년 전 조회 2,203
16년 전 조회 2,730
16년 전 조회 2,911
16년 전 조회 2,062
16년 전 조회 1,849
16년 전 조회 2,777
16년 전 조회 5,491
16년 전 조회 2,768
16년 전 조회 3,425
16년 전 조회 2,275
16년 전 조회 4,182
16년 전 조회 4,973
16년 전 조회 3,618
16년 전 조회 2,867
16년 전 조회 2,989
16년 전 조회 3,199
16년 전 조회 2,718
16년 전 조회 6,076
16년 전 조회 3,895
16년 전 조회 1,883
16년 전 조회 2,223
16년 전 조회 5,580
16년 전 조회 2,829
16년 전 조회 3,910