리자

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

<!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,235
15년 전 조회 1,364
15년 전 조회 1,663
15년 전 조회 1,626
15년 전 조회 1,616
15년 전 조회 1,119
15년 전 조회 1,364
15년 전 조회 1,507
15년 전 조회 1,410
15년 전 조회 2,138
15년 전 조회 1,283
15년 전 조회 1,342
15년 전 조회 887
15년 전 조회 998
15년 전 조회 960
15년 전 조회 924
15년 전 조회 873
15년 전 조회 938
15년 전 조회 1,079
15년 전 조회 1,100
15년 전 조회 2,620
15년 전 조회 947
15년 전 조회 1,601
15년 전 조회 1,467
15년 전 조회 1,591
15년 전 조회 1,299
15년 전 조회 1,786
15년 전 조회 605
15년 전 조회 1,093
15년 전 조회 1,061
15년 전 조회 2,854
15년 전 조회 3,171
15년 전 조회 1,845
15년 전 조회 1,351
15년 전 조회 1,970
15년 전 조회 1,473
15년 전 조회 1,077
15년 전 조회 3,772
15년 전 조회 1,413
15년 전 조회 1,510
15년 전 조회 2,742
15년 전 조회 1,436
15년 전 조회 4,161
15년 전 조회 2,376
15년 전 조회 3,154
15년 전 조회 1,769
15년 전 조회 1,999
15년 전 조회 1,301
15년 전 조회 4,376
15년 전 조회 3,957
15년 전 조회 3,779
15년 전 조회 5,195
15년 전 조회 3,416
15년 전 조회 1,796
15년 전 조회 1,759
15년 전 조회 1,901
15년 전 조회 1,596
15년 전 조회 3,997
15년 전 조회 2,908
15년 전 조회 2,090
15년 전 조회 1,670
15년 전 조회 1,905
15년 전 조회 2,384
15년 전 조회 1,468
15년 전 조회 2,400
15년 전 조회 1,736
15년 전 조회 1,836
15년 전 조회 1,490
15년 전 조회 2,176
15년 전 조회 1,507
15년 전 조회 1,923
16년 전 조회 2,113
16년 전 조회 1,186
16년 전 조회 1,251
16년 전 조회 1,899
16년 전 조회 5,339
16년 전 조회 1,637
16년 전 조회 2,148
16년 전 조회 2,349
16년 전 조회 1,500
16년 전 조회 1,309
16년 전 조회 2,223
16년 전 조회 4,935
16년 전 조회 2,212
16년 전 조회 2,867
16년 전 조회 1,748
16년 전 조회 3,600
16년 전 조회 4,442
16년 전 조회 3,105
16년 전 조회 2,353
16년 전 조회 2,434
16년 전 조회 2,683
16년 전 조회 2,172
16년 전 조회 5,512
16년 전 조회 3,367
16년 전 조회 1,360
16년 전 조회 1,702
16년 전 조회 5,076
16년 전 조회 2,310
16년 전 조회 3,413
🐛 버그신고