리자

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

<!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,236
15년 전 조회 1,365
15년 전 조회 1,665
15년 전 조회 1,630
15년 전 조회 1,620
15년 전 조회 1,122
15년 전 조회 1,369
15년 전 조회 1,510
15년 전 조회 1,416
15년 전 조회 2,141
15년 전 조회 1,288
15년 전 조회 1,345
15년 전 조회 892
15년 전 조회 1,001
15년 전 조회 966
15년 전 조회 930
15년 전 조회 880
15년 전 조회 942
15년 전 조회 1,083
15년 전 조회 1,102
15년 전 조회 2,623
15년 전 조회 948
15년 전 조회 1,602
15년 전 조회 1,469
15년 전 조회 1,598
15년 전 조회 1,301
15년 전 조회 1,789
15년 전 조회 608
15년 전 조회 1,096
15년 전 조회 1,063
15년 전 조회 2,858
15년 전 조회 3,174
15년 전 조회 1,848
15년 전 조회 1,355
15년 전 조회 1,973
15년 전 조회 1,478
15년 전 조회 1,080
15년 전 조회 3,777
15년 전 조회 1,420
15년 전 조회 1,516
15년 전 조회 2,743
15년 전 조회 1,442
15년 전 조회 4,168
15년 전 조회 2,380
15년 전 조회 3,159
15년 전 조회 1,774
15년 전 조회 2,004
15년 전 조회 1,305
15년 전 조회 4,382
15년 전 조회 3,959
15년 전 조회 3,783
15년 전 조회 5,200
15년 전 조회 3,421
15년 전 조회 1,802
15년 전 조회 1,760
15년 전 조회 1,905
15년 전 조회 1,598
15년 전 조회 3,998
15년 전 조회 2,911
15년 전 조회 2,094
15년 전 조회 1,673
15년 전 조회 1,909
15년 전 조회 2,390
15년 전 조회 1,473
15년 전 조회 2,407
15년 전 조회 1,741
15년 전 조회 1,839
15년 전 조회 1,493
15년 전 조회 2,177
15년 전 조회 1,510
15년 전 조회 1,926
16년 전 조회 2,117
16년 전 조회 1,188
16년 전 조회 1,256
16년 전 조회 1,902
16년 전 조회 5,344
16년 전 조회 1,642
16년 전 조회 2,154
16년 전 조회 2,351
16년 전 조회 1,506
16년 전 조회 1,310
16년 전 조회 2,228
16년 전 조회 4,941
16년 전 조회 2,216
16년 전 조회 2,871
16년 전 조회 1,754
16년 전 조회 3,607
16년 전 조회 4,444
16년 전 조회 3,109
16년 전 조회 2,357
16년 전 조회 2,443
16년 전 조회 2,687
16년 전 조회 2,174
16년 전 조회 5,516
16년 전 조회 3,372
16년 전 조회 1,364
16년 전 조회 1,706
16년 전 조회 5,078
16년 전 조회 2,313
16년 전 조회 3,417
🐛 버그신고