리자

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

<!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,346
15년 전 조회 1,464
15년 전 조회 1,744
15년 전 조회 1,727
15년 전 조회 1,727
15년 전 조회 1,222
15년 전 조회 1,462
15년 전 조회 1,602
15년 전 조회 1,515
15년 전 조회 2,237
15년 전 조회 1,378
15년 전 조회 1,447
15년 전 조회 995
15년 전 조회 1,081
15년 전 조회 1,069
15년 전 조회 1,026
15년 전 조회 969
15년 전 조회 1,038
15년 전 조회 1,178
15년 전 조회 1,189
15년 전 조회 2,720
15년 전 조회 1,028
15년 전 조회 1,696
15년 전 조회 1,555
15년 전 조회 1,694
15년 전 조회 1,392
15년 전 조회 1,888
15년 전 조회 697
15년 전 조회 1,183
15년 전 조회 1,158
15년 전 조회 2,938
15년 전 조회 3,270
15년 전 조회 1,942
15년 전 조회 1,445
15년 전 조회 2,057
15년 전 조회 1,576
15년 전 조회 1,169
15년 전 조회 3,871
15년 전 조회 1,508
15년 전 조회 1,602
15년 전 조회 2,837
15년 전 조회 1,529
15년 전 조회 4,260
15년 전 조회 2,465
15년 전 조회 3,239
15년 전 조회 1,860
15년 전 조회 2,096
15년 전 조회 1,393
15년 전 조회 4,464
15년 전 조회 4,058
15년 전 조회 3,877
15년 전 조회 5,291
15년 전 조회 3,521
15년 전 조회 1,895
15년 전 조회 1,845
15년 전 조회 1,976
15년 전 조회 1,690
15년 전 조회 4,088
15년 전 조회 3,010
15년 전 조회 2,172
16년 전 조회 1,764
16년 전 조회 1,988
16년 전 조회 2,482
16년 전 조회 1,557
16년 전 조회 2,494
16년 전 조회 1,819
16년 전 조회 1,927
16년 전 조회 1,573
16년 전 조회 2,281
16년 전 조회 1,597
16년 전 조회 2,019
16년 전 조회 2,205
16년 전 조회 1,269
16년 전 조회 1,338
16년 전 조회 1,993
16년 전 조회 5,423
16년 전 조회 1,726
16년 전 조회 2,250
16년 전 조회 2,443
16년 전 조회 1,597
16년 전 조회 1,387
16년 전 조회 2,316
16년 전 조회 5,028
16년 전 조회 2,300
16년 전 조회 2,958
16년 전 조회 1,837
16년 전 조회 3,682
16년 전 조회 4,529
16년 전 조회 3,181
16년 전 조회 2,436
16년 전 조회 2,534
16년 전 조회 2,766
16년 전 조회 2,264
16년 전 조회 5,609
16년 전 조회 3,454
16년 전 조회 1,448
16년 전 조회 1,796
16년 전 조회 5,160
16년 전 조회 2,401
16년 전 조회 3,495