리자

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

<!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,584
15년 전 조회 1,677
15년 전 조회 1,935
15년 전 조회 1,920
15년 전 조회 1,913
15년 전 조회 1,408
15년 전 조회 1,653
15년 전 조회 1,800
15년 전 조회 1,711
15년 전 조회 2,417
15년 전 조회 1,584
15년 전 조회 1,706
15년 전 조회 1,181
15년 전 조회 1,284
15년 전 조회 1,268
15년 전 조회 1,229
15년 전 조회 1,172
15년 전 조회 1,219
15년 전 조회 1,357
15년 전 조회 1,400
15년 전 조회 2,902
15년 전 조회 1,233
15년 전 조회 1,884
15년 전 조회 1,766
15년 전 조회 1,886
15년 전 조회 1,588
15년 전 조회 2,090
15년 전 조회 906
15년 전 조회 1,363
15년 전 조회 1,348
15년 전 조회 3,124
15년 전 조회 3,517
15년 전 조회 2,189
15년 전 조회 1,633
15년 전 조회 2,257
15년 전 조회 1,745
15년 전 조회 1,366
15년 전 조회 4,051
15년 전 조회 1,719
15년 전 조회 1,789
15년 전 조회 3,083
15년 전 조회 1,776
15년 전 조회 4,450
15년 전 조회 2,659
15년 전 조회 3,432
15년 전 조회 2,063
15년 전 조회 2,290
15년 전 조회 1,580
15년 전 조회 4,644
15년 전 조회 4,296
15년 전 조회 4,097
15년 전 조회 5,481
15년 전 조회 3,717
15년 전 조회 2,074
16년 전 조회 2,030
16년 전 조회 2,176
16년 전 조회 1,879
16년 전 조회 4,315
16년 전 조회 3,207
16년 전 조회 2,373
16년 전 조회 1,961
16년 전 조회 2,160
16년 전 조회 2,661
16년 전 조회 1,745
16년 전 조회 2,675
16년 전 조회 1,991
16년 전 조회 2,122
16년 전 조회 1,768
16년 전 조회 2,466
16년 전 조회 1,794
16년 전 조회 2,209
16년 전 조회 2,370
16년 전 조회 1,463
16년 전 조회 1,530
16년 전 조회 2,180
16년 전 조회 5,598
16년 전 조회 1,901
16년 전 조회 2,428
16년 전 조회 2,621
16년 전 조회 1,776
16년 전 조회 1,562
16년 전 조회 2,483
16년 전 조회 5,199
16년 전 조회 2,473
16년 전 조회 3,139
16년 전 조회 2,001
16년 전 조회 3,867
16년 전 조회 4,707
16년 전 조회 3,353
16년 전 조회 2,593
16년 전 조회 2,686
16년 전 조회 2,929
16년 전 조회 2,437
16년 전 조회 5,823
16년 전 조회 3,629
16년 전 조회 1,620
16년 전 조회 1,958
16년 전 조회 5,327
16년 전 조회 2,584
16년 전 조회 3,652