리자

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

<!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,495
15년 전 조회 1,592
15년 전 조회 1,872
15년 전 조회 1,851
15년 전 조회 1,841
15년 전 조회 1,333
15년 전 조회 1,582
15년 전 조회 1,724
15년 전 조회 1,633
15년 전 조회 2,341
15년 전 조회 1,506
15년 전 조회 1,607
15년 전 조회 1,105
15년 전 조회 1,205
15년 전 조회 1,192
15년 전 조회 1,156
15년 전 조회 1,082
15년 전 조회 1,137
15년 전 조회 1,296
15년 전 조회 1,315
15년 전 조회 2,844
15년 전 조회 1,145
15년 전 조회 1,808
15년 전 조회 1,696
15년 전 조회 1,811
15년 전 조회 1,509
15년 전 조회 2,018
15년 전 조회 833
15년 전 조회 1,301
15년 전 조회 1,273
15년 전 조회 3,048
15년 전 조회 3,428
15년 전 조회 2,091
15년 전 조회 1,552
15년 전 조회 2,179
15년 전 조회 1,673
15년 전 조회 1,284
15년 전 조회 3,971
15년 전 조회 1,638
15년 전 조회 1,718
15년 전 조회 2,990
15년 전 조회 1,676
15년 전 조회 4,384
15년 전 조회 2,573
15년 전 조회 3,356
15년 전 조회 1,984
15년 전 조회 2,222
15년 전 조회 1,508
15년 전 조회 4,569
15년 전 조회 4,212
15년 전 조회 4,012
15년 전 조회 5,409
15년 전 조회 3,645
15년 전 조회 2,012
15년 전 조회 1,956
15년 전 조회 2,097
16년 전 조회 1,802
16년 전 조회 4,230
16년 전 조회 3,131
16년 전 조회 2,276
16년 전 조회 1,882
16년 전 조회 2,085
16년 전 조회 2,594
16년 전 조회 1,668
16년 전 조회 2,594
16년 전 조회 1,921
16년 전 조회 2,046
16년 전 조회 1,699
16년 전 조회 2,383
16년 전 조회 1,699
16년 전 조회 2,128
16년 전 조회 2,314
16년 전 조회 1,397
16년 전 조회 1,451
16년 전 조회 2,106
16년 전 조회 5,530
16년 전 조회 1,835
16년 전 조회 2,338
16년 전 조회 2,538
16년 전 조회 1,701
16년 전 조회 1,488
16년 전 조회 2,419
16년 전 조회 5,123
16년 전 조회 2,386
16년 전 조회 3,061
16년 전 조회 1,924
16년 전 조회 3,792
16년 전 조회 4,636
16년 전 조회 3,276
16년 전 조회 2,520
16년 전 조회 2,614
16년 전 조회 2,854
16년 전 조회 2,365
16년 전 조회 5,731
16년 전 조회 3,551
16년 전 조회 1,554
16년 전 조회 1,884
16년 전 조회 5,256
16년 전 조회 2,500
16년 전 조회 3,582