리자

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

<!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,817
15년 전 조회 1,933
15년 전 조회 2,208
15년 전 조회 2,199
15년 전 조회 2,197
15년 전 조회 1,672
15년 전 조회 1,925
15년 전 조회 2,052
15년 전 조회 2,005
15년 전 조회 2,698
15년 전 조회 1,843
15년 전 조회 1,950
15년 전 조회 1,446
15년 전 조회 1,550
15년 전 조회 1,539
15년 전 조회 1,482
15년 전 조회 1,440
15년 전 조회 1,481
15년 전 조회 1,631
15년 전 조회 1,660
15년 전 조회 3,168
15년 전 조회 1,493
15년 전 조회 2,145
15년 전 조회 2,000
15년 전 조회 2,160
15년 전 조회 1,865
15년 전 조회 2,368
15년 전 조회 1,175
15년 전 조회 1,645
15년 전 조회 1,621
15년 전 조회 3,418
15년 전 조회 3,756
15년 전 조회 2,454
15년 전 조회 1,897
15년 전 조회 2,533
15년 전 조회 2,018
15년 전 조회 1,635
15년 전 조회 4,328
15년 전 조회 1,980
15년 전 조회 2,069
15년 전 조회 3,319
15년 전 조회 2,029
15년 전 조회 4,720
15년 전 조회 2,913
15년 전 조회 3,712
15년 전 조회 2,323
15년 전 조회 2,566
15년 전 조회 1,855
15년 전 조회 4,919
16년 전 조회 4,535
16년 전 조회 4,327
16년 전 조회 5,747
16년 전 조회 3,978
16년 전 조회 2,328
16년 전 조회 2,309
16년 전 조회 2,445
16년 전 조회 2,138
16년 전 조회 4,571
16년 전 조회 3,477
16년 전 조회 2,634
16년 전 조회 2,235
16년 전 조회 2,423
16년 전 조회 2,929
16년 전 조회 2,029
16년 전 조회 2,947
16년 전 조회 2,272
16년 전 조회 2,398
16년 전 조회 2,017
16년 전 조회 2,730
16년 전 조회 2,058
16년 전 조회 2,477
16년 전 조회 2,655
16년 전 조회 1,729
16년 전 조회 1,790
16년 전 조회 2,458
16년 전 조회 5,872
16년 전 조회 2,184
16년 전 조회 2,714
16년 전 조회 2,892
16년 전 조회 2,044
16년 전 조회 1,833
16년 전 조회 2,758
16년 전 조회 5,474
16년 전 조회 2,749
16년 전 조회 3,408
16년 전 조회 2,264
16년 전 조회 4,163
16년 전 조회 4,958
16년 전 조회 3,600
16년 전 조회 2,851
16년 전 조회 2,967
16년 전 조회 3,178
16년 전 조회 2,703
16년 전 조회 6,050
16년 전 조회 3,879
16년 전 조회 1,868
16년 전 조회 2,199
16년 전 조회 5,559
16년 전 조회 2,813
16년 전 조회 3,894