리자

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

<!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,264
15년 전 조회 1,393
15년 전 조회 1,695
15년 전 조회 1,657
15년 전 조회 1,648
15년 전 조회 1,148
15년 전 조회 1,394
15년 전 조회 1,535
15년 전 조회 1,450
15년 전 조회 2,166
15년 전 조회 1,317
15년 전 조회 1,376
15년 전 조회 921
15년 전 조회 1,026
15년 전 조회 998
15년 전 조회 952
15년 전 조회 908
15년 전 조회 963
15년 전 조회 1,112
15년 전 조회 1,123
15년 전 조회 2,647
15년 전 조회 975
15년 전 조회 1,634
15년 전 조회 1,499
15년 전 조회 1,623
15년 전 조회 1,324
15년 전 조회 1,818
15년 전 조회 632
15년 전 조회 1,124
15년 전 조회 1,092
15년 전 조회 2,873
15년 전 조회 3,201
15년 전 조회 1,871
15년 전 조회 1,383
15년 전 조회 1,998
15년 전 조회 1,504
15년 전 조회 1,095
15년 전 조회 3,794
15년 전 조회 1,448
15년 전 조회 1,540
15년 전 조회 2,775
15년 전 조회 1,465
15년 전 조회 4,192
15년 전 조회 2,402
15년 전 조회 3,187
15년 전 조회 1,792
15년 전 조회 2,023
15년 전 조회 1,326
15년 전 조회 4,403
15년 전 조회 3,984
15년 전 조회 3,808
15년 전 조회 5,228
15년 전 조회 3,445
15년 전 조회 1,832
15년 전 조회 1,780
15년 전 조회 1,930
15년 전 조회 1,620
15년 전 조회 4,018
15년 전 조회 2,945
15년 전 조회 2,115
15년 전 조회 1,698
15년 전 조회 1,936
15년 전 조회 2,420
16년 전 조회 1,495
16년 전 조회 2,426
16년 전 조회 1,756
16년 전 조회 1,862
16년 전 조회 1,512
16년 전 조회 2,207
16년 전 조회 1,540
16년 전 조회 1,950
16년 전 조회 2,135
16년 전 조회 1,210
16년 전 조회 1,279
16년 전 조회 1,927
16년 전 조회 5,370
16년 전 조회 1,670
16년 전 조회 2,184
16년 전 조회 2,373
16년 전 조회 1,529
16년 전 조회 1,333
16년 전 조회 2,253
16년 전 조회 4,967
16년 전 조회 2,237
16년 전 조회 2,896
16년 전 조회 1,774
16년 전 조회 3,626
16년 전 조회 4,463
16년 전 조회 3,128
16년 전 조회 2,376
16년 전 조회 2,464
16년 전 조회 2,706
16년 전 조회 2,203
16년 전 조회 5,537
16년 전 조회 3,392
16년 전 조회 1,384
16년 전 조회 1,731
16년 전 조회 5,100
16년 전 조회 2,343
16년 전 조회 3,432