리자

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

<!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,223
15년 전 조회 1,355
15년 전 조회 1,647
15년 전 조회 1,613
15년 전 조회 1,606
15년 전 조회 1,110
15년 전 조회 1,359
15년 전 조회 1,498
15년 전 조회 1,401
15년 전 조회 2,131
15년 전 조회 1,274
15년 전 조회 1,332
15년 전 조회 877
15년 전 조회 987
15년 전 조회 951
15년 전 조회 917
15년 전 조회 866
15년 전 조회 927
15년 전 조회 1,069
15년 전 조회 1,090
15년 전 조회 2,609
15년 전 조회 935
15년 전 조회 1,588
15년 전 조회 1,458
15년 전 조회 1,578
15년 전 조회 1,287
15년 전 조회 1,777
15년 전 조회 595
15년 전 조회 1,080
15년 전 조회 1,053
15년 전 조회 2,847
15년 전 조회 3,157
15년 전 조회 1,833
15년 전 조회 1,342
15년 전 조회 1,959
15년 전 조회 1,463
15년 전 조회 1,070
15년 전 조회 3,762
15년 전 조회 1,405
15년 전 조회 1,504
15년 전 조회 2,731
15년 전 조회 1,427
15년 전 조회 4,154
15년 전 조회 2,368
15년 전 조회 3,142
15년 전 조회 1,763
15년 전 조회 1,992
15년 전 조회 1,290
15년 전 조회 4,369
15년 전 조회 3,946
15년 전 조회 3,772
15년 전 조회 5,184
15년 전 조회 3,406
15년 전 조회 1,786
15년 전 조회 1,747
15년 전 조회 1,892
15년 전 조회 1,585
15년 전 조회 3,983
15년 전 조회 2,897
15년 전 조회 2,084
15년 전 조회 1,660
15년 전 조회 1,895
15년 전 조회 2,378
15년 전 조회 1,461
15년 전 조회 2,393
15년 전 조회 1,728
15년 전 조회 1,828
15년 전 조회 1,479
15년 전 조회 2,170
15년 전 조회 1,498
15년 전 조회 1,916
16년 전 조회 2,106
16년 전 조회 1,182
16년 전 조회 1,241
16년 전 조회 1,886
16년 전 조회 5,329
16년 전 조회 1,632
16년 전 조회 2,140
16년 전 조회 2,342
16년 전 조회 1,489
16년 전 조회 1,298
16년 전 조회 2,212
16년 전 조회 4,928
16년 전 조회 2,204
16년 전 조회 2,858
16년 전 조회 1,740
16년 전 조회 3,593
16년 전 조회 4,432
16년 전 조회 3,100
16년 전 조회 2,344
16년 전 조회 2,426
16년 전 조회 2,675
16년 전 조회 2,162
16년 전 조회 5,505
16년 전 조회 3,357
16년 전 조회 1,349
16년 전 조회 1,696
16년 전 조회 5,065
16년 전 조회 2,301
16년 전 조회 3,407
🐛 버그신고