리자

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

<!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,242
15년 전 조회 1,370
15년 전 조회 1,667
15년 전 조회 1,636
15년 전 조회 1,625
15년 전 조회 1,126
15년 전 조회 1,375
15년 전 조회 1,514
15년 전 조회 1,425
15년 전 조회 2,148
15년 전 조회 1,289
15년 전 조회 1,349
15년 전 조회 897
15년 전 조회 1,003
15년 전 조회 971
15년 전 조회 934
15년 전 조회 884
15년 전 조회 944
15년 전 조회 1,085
15년 전 조회 1,105
15년 전 조회 2,625
15년 전 조회 951
15년 전 조회 1,605
15년 전 조회 1,476
15년 전 조회 1,604
15년 전 조회 1,304
15년 전 조회 1,796
15년 전 조회 613
15년 전 조회 1,102
15년 전 조회 1,070
15년 전 조회 2,860
15년 전 조회 3,177
15년 전 조회 1,852
15년 전 조회 1,360
15년 전 조회 1,978
15년 전 조회 1,482
15년 전 조회 1,087
15년 전 조회 3,778
15년 전 조회 1,424
15년 전 조회 1,520
15년 전 조회 2,749
15년 전 조회 1,447
15년 전 조회 4,173
15년 전 조회 2,382
15년 전 조회 3,163
15년 전 조회 1,779
15년 전 조회 2,006
15년 전 조회 1,306
15년 전 조회 4,384
15년 전 조회 3,963
15년 전 조회 3,787
15년 전 조회 5,203
15년 전 조회 3,424
15년 전 조회 1,805
15년 전 조회 1,763
15년 전 조회 1,908
15년 전 조회 1,600
15년 전 조회 4,005
15년 전 조회 2,915
15년 전 조회 2,098
15년 전 조회 1,678
15년 전 조회 1,914
15년 전 조회 2,396
15년 전 조회 1,477
15년 전 조회 2,412
16년 전 조회 1,743
16년 전 조회 1,843
16년 전 조회 1,493
16년 전 조회 2,183
16년 전 조회 1,517
16년 전 조회 1,930
16년 전 조회 2,121
16년 전 조회 1,193
16년 전 조회 1,261
16년 전 조회 1,908
16년 전 조회 5,347
16년 전 조회 1,648
16년 전 조회 2,158
16년 전 조회 2,360
16년 전 조회 1,511
16년 전 조회 1,314
16년 전 조회 2,230
16년 전 조회 4,943
16년 전 조회 2,217
16년 전 조회 2,878
16년 전 조회 1,756
16년 전 조회 3,611
16년 전 조회 4,446
16년 전 조회 3,111
16년 전 조회 2,358
16년 전 조회 2,447
16년 전 조회 2,690
16년 전 조회 2,180
16년 전 조회 5,518
16년 전 조회 3,377
16년 전 조회 1,368
16년 전 조회 1,709
16년 전 조회 5,081
16년 전 조회 2,320
16년 전 조회 3,420