리자

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

<!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,223
15년 전 조회 1,354
15년 전 조회 1,646
15년 전 조회 1,612
15년 전 조회 1,605
15년 전 조회 1,108
15년 전 조회 1,357
15년 전 조회 1,497
15년 전 조회 1,401
15년 전 조회 2,130
15년 전 조회 1,273
15년 전 조회 1,331
15년 전 조회 873
15년 전 조회 986
15년 전 조회 948
15년 전 조회 915
15년 전 조회 864
15년 전 조회 925
15년 전 조회 1,069
15년 전 조회 1,089
15년 전 조회 2,607
15년 전 조회 934
15년 전 조회 1,587
15년 전 조회 1,457
15년 전 조회 1,578
15년 전 조회 1,286
15년 전 조회 1,775
15년 전 조회 595
15년 전 조회 1,080
15년 전 조회 1,051
15년 전 조회 2,844
15년 전 조회 3,157
15년 전 조회 1,832
15년 전 조회 1,340
15년 전 조회 1,958
15년 전 조회 1,463
15년 전 조회 1,067
15년 전 조회 3,761
15년 전 조회 1,404
15년 전 조회 1,500
15년 전 조회 2,729
15년 전 조회 1,427
15년 전 조회 4,152
15년 전 조회 2,366
15년 전 조회 3,142
15년 전 조회 1,761
15년 전 조회 1,990
15년 전 조회 1,290
15년 전 조회 4,368
15년 전 조회 3,942
15년 전 조회 3,770
15년 전 조회 5,183
15년 전 조회 3,406
15년 전 조회 1,785
15년 전 조회 1,747
15년 전 조회 1,890
15년 전 조회 1,584
15년 전 조회 3,983
15년 전 조회 2,896
15년 전 조회 2,082
15년 전 조회 1,660
15년 전 조회 1,895
15년 전 조회 2,377
15년 전 조회 1,459
15년 전 조회 2,393
15년 전 조회 1,726
15년 전 조회 1,825
15년 전 조회 1,478
15년 전 조회 2,167
15년 전 조회 1,497
15년 전 조회 1,913
16년 전 조회 2,105
16년 전 조회 1,180
16년 전 조회 1,240
16년 전 조회 1,886
16년 전 조회 5,329
16년 전 조회 1,631
16년 전 조회 2,140
16년 전 조회 2,340
16년 전 조회 1,488
16년 전 조회 1,297
16년 전 조회 2,212
16년 전 조회 4,926
16년 전 조회 2,202
16년 전 조회 2,858
16년 전 조회 1,739
16년 전 조회 3,592
16년 전 조회 4,430
16년 전 조회 3,099
16년 전 조회 2,343
16년 전 조회 2,425
16년 전 조회 2,673
16년 전 조회 2,162
16년 전 조회 5,504
16년 전 조회 3,356
16년 전 조회 1,348
16년 전 조회 1,694
16년 전 조회 5,064
16년 전 조회 2,299
16년 전 조회 3,405
🐛 버그신고