리자

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

<!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,286
15년 전 조회 1,416
15년 전 조회 1,712
15년 전 조회 1,678
15년 전 조회 1,672
15년 전 조회 1,170
15년 전 조회 1,413
15년 전 조회 1,550
15년 전 조회 1,469
15년 전 조회 2,182
15년 전 조회 1,333
15년 전 조회 1,396
15년 전 조회 945
15년 전 조회 1,045
15년 전 조회 1,011
15년 전 조회 968
15년 전 조회 922
15년 전 조회 983
15년 전 조회 1,132
15년 전 조회 1,143
15년 전 조회 2,666
15년 전 조회 995
15년 전 조회 1,646
15년 전 조회 1,519
15년 전 조회 1,644
15년 전 조회 1,341
15년 전 조회 1,843
15년 전 조회 655
15년 전 조회 1,141
15년 전 조회 1,111
15년 전 조회 2,882
15년 전 조회 3,221
15년 전 조회 1,885
15년 전 조회 1,404
15년 전 조회 2,014
15년 전 조회 1,522
15년 전 조회 1,116
15년 전 조회 3,809
15년 전 조회 1,464
15년 전 조회 1,559
15년 전 조회 2,784
15년 전 조회 1,476
15년 전 조회 4,202
15년 전 조회 2,416
15년 전 조회 3,203
15년 전 조회 1,811
15년 전 조회 2,038
15년 전 조회 1,348
15년 전 조회 4,424
15년 전 조회 3,999
15년 전 조회 3,824
15년 전 조회 5,245
15년 전 조회 3,470
15년 전 조회 1,853
15년 전 조회 1,797
15년 전 조회 1,944
15년 전 조회 1,637
15년 전 조회 4,037
15년 전 조회 2,962
15년 전 조회 2,134
16년 전 조회 1,718
16년 전 조회 1,955
16년 전 조회 2,437
16년 전 조회 1,513
16년 전 조회 2,443
16년 전 조회 1,778
16년 전 조회 1,882
16년 전 조회 1,527
16년 전 조회 2,229
16년 전 조회 1,556
16년 전 조회 1,972
16년 전 조회 2,152
16년 전 조회 1,227
16년 전 조회 1,296
16년 전 조회 1,943
16년 전 조회 5,386
16년 전 조회 1,687
16년 전 조회 2,206
16년 전 조회 2,392
16년 전 조회 1,548
16년 전 조회 1,351
16년 전 조회 2,269
16년 전 조회 4,989
16년 전 조회 2,256
16년 전 조회 2,916
16년 전 조회 1,791
16년 전 조회 3,645
16년 전 조회 4,486
16년 전 조회 3,141
16년 전 조회 2,396
16년 전 조회 2,484
16년 전 조회 2,726
16년 전 조회 2,216
16년 전 조회 5,558
16년 전 조회 3,410
16년 전 조회 1,403
16년 전 조회 1,744
16년 전 조회 5,117
16년 전 조회 2,361
16년 전 조회 3,454