리자

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

<!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,369
15년 전 조회 1,476
15년 전 조회 1,764
15년 전 조회 1,737
15년 전 조회 1,739
15년 전 조회 1,237
15년 전 조회 1,481
15년 전 조회 1,621
15년 전 조회 1,531
15년 전 조회 2,250
15년 전 조회 1,395
15년 전 조회 1,480
15년 전 조회 1,009
15년 전 조회 1,099
15년 전 조회 1,087
15년 전 조회 1,043
15년 전 조회 981
15년 전 조회 1,052
15년 전 조회 1,191
15년 전 조회 1,205
15년 전 조회 2,738
15년 전 조회 1,046
15년 전 조회 1,709
15년 전 조회 1,570
15년 전 조회 1,709
15년 전 조회 1,409
15년 전 조회 1,901
15년 전 조회 713
15년 전 조회 1,201
15년 전 조회 1,174
15년 전 조회 2,959
15년 전 조회 3,294
15년 전 조회 1,966
15년 전 조회 1,460
15년 전 조회 2,071
15년 전 조회 1,587
15년 전 조회 1,187
15년 전 조회 3,883
15년 전 조회 1,517
15년 전 조회 1,614
15년 전 조회 2,863
15년 전 조회 1,556
15년 전 조회 4,272
15년 전 조회 2,479
15년 전 조회 3,256
15년 전 조회 1,878
15년 전 조회 2,111
15년 전 조회 1,402
15년 전 조회 4,480
15년 전 조회 4,085
15년 전 조회 3,901
15년 전 조회 5,303
15년 전 조회 3,533
15년 전 조회 1,910
15년 전 조회 1,856
15년 전 조회 1,992
15년 전 조회 1,707
15년 전 조회 4,103
15년 전 조회 3,023
15년 전 조회 2,187
16년 전 조회 1,784
16년 전 조회 1,996
16년 전 조회 2,490
16년 전 조회 1,572
16년 전 조회 2,505
16년 전 조회 1,830
16년 전 조회 1,944
16년 전 조회 1,593
16년 전 조회 2,291
16년 전 조회 1,601
16년 전 조회 2,029
16년 전 조회 2,215
16년 전 조회 1,288
16년 전 조회 1,350
16년 전 조회 2,012
16년 전 조회 5,434
16년 전 조회 1,734
16년 전 조회 2,256
16년 전 조회 2,451
16년 전 조회 1,607
16년 전 조회 1,397
16년 전 조회 2,328
16년 전 조회 5,038
16년 전 조회 2,308
16년 전 조회 2,971
16년 전 조회 1,844
16년 전 조회 3,698
16년 전 조회 4,540
16년 전 조회 3,189
16년 전 조회 2,448
16년 전 조회 2,543
16년 전 조회 2,776
16년 전 조회 2,274
16년 전 조회 5,626
16년 전 조회 3,469
16년 전 조회 1,455
16년 전 조회 1,810
16년 전 조회 5,169
16년 전 조회 2,416
16년 전 조회 3,502