리자

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

<!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,231
15년 전 조회 1,363
15년 전 조회 1,657
15년 전 조회 1,625
15년 전 조회 1,614
15년 전 조회 1,118
15년 전 조회 1,363
15년 전 조회 1,507
15년 전 조회 1,408
15년 전 조회 2,136
15년 전 조회 1,282
15년 전 조회 1,341
15년 전 조회 886
15년 전 조회 997
15년 전 조회 960
15년 전 조회 924
15년 전 조회 871
15년 전 조회 935
15년 전 조회 1,075
15년 전 조회 1,100
15년 전 조회 2,616
15년 전 조회 943
15년 전 조회 1,598
15년 전 조회 1,464
15년 전 조회 1,591
15년 전 조회 1,297
15년 전 조회 1,786
15년 전 조회 604
15년 전 조회 1,089
15년 전 조회 1,059
15년 전 조회 2,850
15년 전 조회 3,169
15년 전 조회 1,839
15년 전 조회 1,350
15년 전 조회 1,967
15년 전 조회 1,471
15년 전 조회 1,076
15년 전 조회 3,771
15년 전 조회 1,412
15년 전 조회 1,508
15년 전 조회 2,740
15년 전 조회 1,434
15년 전 조회 4,160
15년 전 조회 2,372
15년 전 조회 3,150
15년 전 조회 1,768
15년 전 조회 1,998
15년 전 조회 1,297
15년 전 조회 4,374
15년 전 조회 3,956
15년 전 조회 3,778
15년 전 조회 5,192
15년 전 조회 3,416
15년 전 조회 1,795
15년 전 조회 1,754
15년 전 조회 1,900
15년 전 조회 1,594
15년 전 조회 3,993
15년 전 조회 2,905
15년 전 조회 2,089
15년 전 조회 1,667
15년 전 조회 1,904
15년 전 조회 2,383
15년 전 조회 1,467
15년 전 조회 2,399
15년 전 조회 1,735
15년 전 조회 1,835
15년 전 조회 1,490
15년 전 조회 2,175
15년 전 조회 1,504
15년 전 조회 1,922
16년 전 조회 2,112
16년 전 조회 1,186
16년 전 조회 1,251
16년 전 조회 1,897
16년 전 조회 5,337
16년 전 조회 1,635
16년 전 조회 2,146
16년 전 조회 2,347
16년 전 조회 1,498
16년 전 조회 1,307
16년 전 조회 2,220
16년 전 조회 4,935
16년 전 조회 2,210
16년 전 조회 2,867
16년 전 조회 1,748
16년 전 조회 3,598
16년 전 조회 4,439
16년 전 조회 3,105
16년 전 조회 2,351
16년 전 조회 2,433
16년 전 조회 2,682
16년 전 조회 2,170
16년 전 조회 5,509
16년 전 조회 3,365
16년 전 조회 1,359
16년 전 조회 1,700
16년 전 조회 5,075
16년 전 조회 2,308
16년 전 조회 3,412
🐛 버그신고