리자

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

<!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,025
15년 전 조회 2,023
15년 전 조회 2,011
15년 전 조회 1,508
15년 전 조회 1,741
15년 전 조회 1,880
15년 전 조회 1,813
15년 전 조회 2,498
15년 전 조회 1,666
15년 전 조회 1,773
15년 전 조회 1,268
15년 전 조회 1,376
15년 전 조회 1,357
15년 전 조회 1,309
15년 전 조회 1,267
15년 전 조회 1,311
15년 전 조회 1,445
15년 전 조회 1,494
15년 전 조회 2,984
15년 전 조회 1,324
15년 전 조회 1,987
15년 전 조회 1,854
15년 전 조회 1,984
15년 전 조회 1,687
15년 전 조회 2,196
15년 전 조회 994
15년 전 조회 1,467
15년 전 조회 1,443
15년 전 조회 3,225
15년 전 조회 3,583
15년 전 조회 2,260
15년 전 조회 1,739
15년 전 조회 2,341
15년 전 조회 1,833
15년 전 조회 1,455
15년 전 조회 4,144
15년 전 조회 1,803
15년 전 조회 1,881
15년 전 조회 3,144
15년 전 조회 1,838
15년 전 조회 4,533
15년 전 조회 2,745
15년 전 조회 3,521
15년 전 조회 2,149
15년 전 조회 2,383
15년 전 조회 1,677
15년 전 조회 4,735
15년 전 조회 4,371
16년 전 조회 4,171
16년 전 조회 5,574
16년 전 조회 3,808
16년 전 조회 2,167
16년 전 조회 2,130
16년 전 조회 2,263
16년 전 조회 1,969
16년 전 조회 4,385
16년 전 조회 3,307
16년 전 조회 2,460
16년 전 조회 2,056
16년 전 조회 2,260
16년 전 조회 2,760
16년 전 조회 1,827
16년 전 조회 2,758
16년 전 조회 2,080
16년 전 조회 2,216
16년 전 조회 1,861
16년 전 조회 2,561
16년 전 조회 1,877
16년 전 조회 2,300
16년 전 조회 2,455
16년 전 조회 1,555
16년 전 조회 1,618
16년 전 조회 2,268
16년 전 조회 5,686
16년 전 조회 1,998
16년 전 조회 2,513
16년 전 조회 2,708
16년 전 조회 1,866
16년 전 조회 1,640
16년 전 조회 2,578
16년 전 조회 5,295
16년 전 조회 2,565
16년 전 조회 3,221
16년 전 조회 2,085
16년 전 조회 3,968
16년 전 조회 4,791
16년 전 조회 3,430
16년 전 조회 2,674
16년 전 조회 2,784
16년 전 조회 3,010
16년 전 조회 2,536
16년 전 조회 5,886
16년 전 조회 3,710
16년 전 조회 1,698
16년 전 조회 2,039
16년 전 조회 5,400
16년 전 조회 2,663
16년 전 조회 3,726