리자

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

<!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,221
15년 전 조회 1,351
15년 전 조회 1,645
15년 전 조회 1,611
15년 전 조회 1,605
15년 전 조회 1,106
15년 전 조회 1,354
15년 전 조회 1,495
15년 전 조회 1,399
15년 전 조회 2,128
15년 전 조회 1,271
15년 전 조회 1,328
15년 전 조회 873
15년 전 조회 986
15년 전 조회 948
15년 전 조회 914
15년 전 조회 863
15년 전 조회 924
15년 전 조회 1,068
15년 전 조회 1,087
15년 전 조회 2,605
15년 전 조회 934
15년 전 조회 1,586
15년 전 조회 1,455
15년 전 조회 1,577
15년 전 조회 1,284
15년 전 조회 1,772
15년 전 조회 593
15년 전 조회 1,080
15년 전 조회 1,049
15년 전 조회 2,841
15년 전 조회 3,155
15년 전 조회 1,832
15년 전 조회 1,338
15년 전 조회 1,955
15년 전 조회 1,462
15년 전 조회 1,064
15년 전 조회 3,758
15년 전 조회 1,401
15년 전 조회 1,499
15년 전 조회 2,726
15년 전 조회 1,426
15년 전 조회 4,151
15년 전 조회 2,364
15년 전 조회 3,142
15년 전 조회 1,760
15년 전 조회 1,990
15년 전 조회 1,288
15년 전 조회 4,366
15년 전 조회 3,941
15년 전 조회 3,770
15년 전 조회 5,183
15년 전 조회 3,403
15년 전 조회 1,785
15년 전 조회 1,745
15년 전 조회 1,889
15년 전 조회 1,583
15년 전 조회 3,981
15년 전 조회 2,894
15년 전 조회 2,081
15년 전 조회 1,658
15년 전 조회 1,894
15년 전 조회 2,374
15년 전 조회 1,458
15년 전 조회 2,393
15년 전 조회 1,725
15년 전 조회 1,822
15년 전 조회 1,476
15년 전 조회 2,166
15년 전 조회 1,496
15년 전 조회 1,910
15년 전 조회 2,103
15년 전 조회 1,180
15년 전 조회 1,239
16년 전 조회 1,883
16년 전 조회 5,327
16년 전 조회 1,629
16년 전 조회 2,137
16년 전 조회 2,339
16년 전 조회 1,486
16년 전 조회 1,295
16년 전 조회 2,209
16년 전 조회 4,925
16년 전 조회 2,200
16년 전 조회 2,857
16년 전 조회 1,737
16년 전 조회 3,591
16년 전 조회 4,428
16년 전 조회 3,096
16년 전 조회 2,342
16년 전 조회 2,424
16년 전 조회 2,673
16년 전 조회 2,160
16년 전 조회 5,502
16년 전 조회 3,354
16년 전 조회 1,347
16년 전 조회 1,693
16년 전 조회 5,063
16년 전 조회 2,299
16년 전 조회 3,404
🐛 버그신고