리자

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

<!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,838
15년 전 조회 1,950
15년 전 조회 2,236
15년 전 조회 2,214
15년 전 조회 2,217
15년 전 조회 1,693
15년 전 조회 1,945
15년 전 조회 2,069
15년 전 조회 2,023
15년 전 조회 2,718
15년 전 조회 1,865
15년 전 조회 1,974
15년 전 조회 1,464
15년 전 조회 1,575
15년 전 조회 1,567
15년 전 조회 1,497
15년 전 조회 1,463
15년 전 조회 1,500
15년 전 조회 1,653
15년 전 조회 1,676
15년 전 조회 3,187
15년 전 조회 1,511
15년 전 조회 2,168
15년 전 조회 2,023
15년 전 조회 2,180
15년 전 조회 1,889
15년 전 조회 2,388
15년 전 조회 1,195
15년 전 조회 1,672
15년 전 조회 1,645
15년 전 조회 3,443
15년 전 조회 3,779
15년 전 조회 2,472
15년 전 조회 1,921
15년 전 조회 2,556
15년 전 조회 2,036
15년 전 조회 1,658
15년 전 조회 4,345
15년 전 조회 1,996
15년 전 조회 2,089
15년 전 조회 3,346
15년 전 조회 2,047
15년 전 조회 4,742
15년 전 조회 2,931
15년 전 조회 3,738
15년 전 조회 2,344
15년 전 조회 2,583
15년 전 조회 1,879
16년 전 조회 4,932
16년 전 조회 4,554
16년 전 조회 4,344
16년 전 조회 5,766
16년 전 조회 3,990
16년 전 조회 2,344
16년 전 조회 2,327
16년 전 조회 2,462
16년 전 조회 2,151
16년 전 조회 4,596
16년 전 조회 3,497
16년 전 조회 2,654
16년 전 조회 2,254
16년 전 조회 2,440
16년 전 조회 2,955
16년 전 조회 2,043
16년 전 조회 2,965
16년 전 조회 2,289
16년 전 조회 2,415
16년 전 조회 2,039
16년 전 조회 2,748
16년 전 조회 2,070
16년 전 조회 2,493
16년 전 조회 2,671
16년 전 조회 1,743
16년 전 조회 1,806
16년 전 조회 2,469
16년 전 조회 5,890
16년 전 조회 2,203
16년 전 조회 2,730
16년 전 조회 2,911
16년 전 조회 2,063
16년 전 조회 1,851
16년 전 조회 2,777
16년 전 조회 5,491
16년 전 조회 2,768
16년 전 조회 3,425
16년 전 조회 2,278
16년 전 조회 4,183
16년 전 조회 4,976
16년 전 조회 3,618
16년 전 조회 2,868
16년 전 조회 2,990
16년 전 조회 3,201
16년 전 조회 2,718
16년 전 조회 6,076
16년 전 조회 3,896
16년 전 조회 1,886
16년 전 조회 2,223
16년 전 조회 5,582
16년 전 조회 2,829
16년 전 조회 3,912