리자

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

<!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,641
15년 전 조회 1,758
15년 전 조회 2,027
15년 전 조회 2,024
15년 전 조회 2,012
15년 전 조회 1,508
15년 전 조회 1,742
15년 전 조회 1,883
15년 전 조회 1,814
15년 전 조회 2,498
15년 전 조회 1,666
15년 전 조회 1,774
15년 전 조회 1,269
15년 전 조회 1,376
15년 전 조회 1,359
15년 전 조회 1,310
15년 전 조회 1,268
15년 전 조회 1,311
15년 전 조회 1,445
15년 전 조회 1,494
15년 전 조회 2,984
15년 전 조회 1,324
15년 전 조회 1,987
15년 전 조회 1,855
15년 전 조회 1,984
15년 전 조회 1,688
15년 전 조회 2,197
15년 전 조회 994
15년 전 조회 1,468
15년 전 조회 1,443
15년 전 조회 3,225
15년 전 조회 3,583
15년 전 조회 2,261
15년 전 조회 1,740
15년 전 조회 2,341
15년 전 조회 1,834
15년 전 조회 1,455
15년 전 조회 4,144
15년 전 조회 1,806
15년 전 조회 1,881
15년 전 조회 3,145
15년 전 조회 1,839
15년 전 조회 4,533
15년 전 조회 2,745
15년 전 조회 3,521
15년 전 조회 2,150
15년 전 조회 2,383
15년 전 조회 1,677
15년 전 조회 4,736
15년 전 조회 4,372
16년 전 조회 4,171
16년 전 조회 5,574
16년 전 조회 3,809
16년 전 조회 2,167
16년 전 조회 2,131
16년 전 조회 2,263
16년 전 조회 1,971
16년 전 조회 4,385
16년 전 조회 3,308
16년 전 조회 2,462
16년 전 조회 2,056
16년 전 조회 2,260
16년 전 조회 2,761
16년 전 조회 1,830
16년 전 조회 2,759
16년 전 조회 2,080
16년 전 조회 2,216
16년 전 조회 1,861
16년 전 조회 2,561
16년 전 조회 1,878
16년 전 조회 2,300
16년 전 조회 2,455
16년 전 조회 1,555
16년 전 조회 1,618
16년 전 조회 2,269
16년 전 조회 5,687
16년 전 조회 1,998
16년 전 조회 2,513
16년 전 조회 2,708
16년 전 조회 1,866
16년 전 조회 1,641
16년 전 조회 2,578
16년 전 조회 5,295
16년 전 조회 2,565
16년 전 조회 3,221
16년 전 조회 2,086
16년 전 조회 3,969
16년 전 조회 4,791
16년 전 조회 3,430
16년 전 조회 2,674
16년 전 조회 2,786
16년 전 조회 3,011
16년 전 조회 2,536
16년 전 조회 5,886
16년 전 조회 3,711
16년 전 조회 1,698
16년 전 조회 2,039
16년 전 조회 5,400
16년 전 조회 2,663
16년 전 조회 3,728