리자

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

<!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,578
15년 전 조회 1,662
15년 전 조회 1,928
15년 전 조회 1,910
15년 전 조회 1,901
15년 전 조회 1,397
15년 전 조회 1,643
15년 전 조회 1,794
15년 전 조회 1,700
15년 전 조회 2,411
15년 전 조회 1,577
15년 전 조회 1,698
15년 전 조회 1,173
15년 전 조회 1,275
15년 전 조회 1,256
15년 전 조회 1,217
15년 전 조회 1,159
15년 전 조회 1,210
15년 전 조회 1,350
15년 전 조회 1,389
15년 전 조회 2,892
15년 전 조회 1,216
15년 전 조회 1,877
15년 전 조회 1,757
15년 전 조회 1,876
15년 전 조회 1,581
15년 전 조회 2,075
15년 전 조회 890
15년 전 조회 1,355
15년 전 조회 1,334
15년 전 조회 3,117
15년 전 조회 3,503
15년 전 조회 2,181
15년 전 조회 1,624
15년 전 조회 2,245
15년 전 조회 1,736
15년 전 조회 1,356
15년 전 조회 4,042
15년 전 조회 1,708
15년 전 조회 1,777
15년 전 조회 3,071
15년 전 조회 1,763
15년 전 조회 4,437
15년 전 조회 2,643
15년 전 조회 3,425
15년 전 조회 2,051
15년 전 조회 2,280
15년 전 조회 1,567
15년 전 조회 4,631
15년 전 조회 4,286
15년 전 조회 4,087
15년 전 조회 5,473
15년 전 조회 3,710
15년 전 조회 2,069
16년 전 조회 2,022
16년 전 조회 2,167
16년 전 조회 1,868
16년 전 조회 4,308
16년 전 조회 3,196
16년 전 조회 2,364
16년 전 조회 1,948
16년 전 조회 2,153
16년 전 조회 2,655
16년 전 조회 1,731
16년 전 조회 2,656
16년 전 조회 1,980
16년 전 조회 2,114
16년 전 조회 1,761
16년 전 조회 2,455
16년 전 조회 1,781
16년 전 조회 2,198
16년 전 조회 2,362
16년 전 조회 1,453
16년 전 조회 1,520
16년 전 조회 2,171
16년 전 조회 5,591
16년 전 조회 1,887
16년 전 조회 2,412
16년 전 조회 2,609
16년 전 조회 1,763
16년 전 조회 1,552
16년 전 조회 2,471
16년 전 조회 5,182
16년 전 조회 2,460
16년 전 조회 3,124
16년 전 조회 1,992
16년 전 조회 3,860
16년 전 조회 4,696
16년 전 조회 3,342
16년 전 조회 2,587
16년 전 조회 2,677
16년 전 조회 2,919
16년 전 조회 2,428
16년 전 조회 5,812
16년 전 조회 3,616
16년 전 조회 1,605
16년 전 조회 1,948
16년 전 조회 5,316
16년 전 조회 2,572
16년 전 조회 3,642