리자

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

<!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,598
15년 전 조회 1,695
15년 전 조회 1,954
15년 전 조회 1,937
15년 전 조회 1,927
15년 전 조회 1,429
15년 전 조회 1,672
15년 전 조회 1,812
15년 전 조회 1,729
15년 전 조회 2,435
15년 전 조회 1,604
15년 전 조회 1,722
15년 전 조회 1,197
15년 전 조회 1,295
15년 전 조회 1,283
15년 전 조회 1,240
15년 전 조회 1,191
15년 전 조회 1,234
15년 전 조회 1,379
15년 전 조회 1,418
15년 전 조회 2,917
15년 전 조회 1,247
15년 전 조회 1,904
15년 전 조회 1,781
15년 전 조회 1,912
15년 전 조회 1,606
15년 전 조회 2,109
15년 전 조회 916
15년 전 조회 1,380
15년 전 조회 1,363
15년 전 조회 3,145
15년 전 조회 3,528
15년 전 조회 2,205
15년 전 조회 1,648
15년 전 조회 2,276
15년 전 조회 1,759
15년 전 조회 1,379
15년 전 조회 4,064
15년 전 조회 1,731
15년 전 조회 1,802
15년 전 조회 3,100
15년 전 조회 1,790
15년 전 조회 4,463
15년 전 조회 2,670
15년 전 조회 3,448
15년 전 조회 2,077
15년 전 조회 2,311
15년 전 조회 1,595
15년 전 조회 4,657
15년 전 조회 4,311
15년 전 조회 4,108
15년 전 조회 5,502
16년 전 조회 3,735
16년 전 조회 2,091
16년 전 조회 2,049
16년 전 조회 2,193
16년 전 조회 1,889
16년 전 조회 4,331
16년 전 조회 3,221
16년 전 조회 2,392
16년 전 조회 1,969
16년 전 조회 2,179
16년 전 조회 2,678
16년 전 조회 1,762
16년 전 조회 2,691
16년 전 조회 2,009
16년 전 조회 2,139
16년 전 조회 1,785
16년 전 조회 2,485
16년 전 조회 1,813
16년 전 조회 2,227
16년 전 조회 2,388
16년 전 조회 1,479
16년 전 조회 1,548
16년 전 조회 2,200
16년 전 조회 5,615
16년 전 조회 1,915
16년 전 조회 2,442
16년 전 조회 2,639
16년 전 조회 1,797
16년 전 조회 1,580
16년 전 조회 2,499
16년 전 조회 5,214
16년 전 조회 2,494
16년 전 조회 3,151
16년 전 조회 2,019
16년 전 조회 3,888
16년 전 조회 4,715
16년 전 조회 3,364
16년 전 조회 2,605
16년 전 조회 2,704
16년 전 조회 2,948
16년 전 조회 2,451
16년 전 조회 5,838
16년 전 조회 3,646
16년 전 조회 1,635
16년 전 조회 1,979
16년 전 조회 5,337
16년 전 조회 2,603
16년 전 조회 3,672