리자

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

<!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,834
15년 전 조회 1,947
15년 전 조회 2,229
15년 전 조회 2,210
15년 전 조회 2,209
15년 전 조회 1,688
15년 전 조회 1,939
15년 전 조회 2,064
15년 전 조회 2,019
15년 전 조회 2,714
15년 전 조회 1,860
15년 전 조회 1,969
15년 전 조회 1,461
15년 전 조회 1,570
15년 전 조회 1,558
15년 전 조회 1,496
15년 전 조회 1,459
15년 전 조회 1,495
15년 전 조회 1,648
15년 전 조회 1,672
15년 전 조회 3,183
15년 전 조회 1,507
15년 전 조회 2,162
15년 전 조회 2,015
15년 전 조회 2,179
15년 전 조회 1,884
15년 전 조회 2,384
15년 전 조회 1,190
15년 전 조회 1,668
15년 전 조회 1,639
15년 전 조회 3,440
15년 전 조회 3,773
15년 전 조회 2,468
15년 전 조회 1,913
15년 전 조회 2,553
15년 전 조회 2,029
15년 전 조회 1,653
15년 전 조회 4,343
15년 전 조회 1,993
15년 전 조회 2,083
15년 전 조회 3,340
15년 전 조회 2,041
15년 전 조회 4,738
15년 전 조회 2,927
15년 전 조회 3,729
15년 전 조회 2,340
15년 전 조회 2,580
15년 전 조회 1,873
16년 전 조회 4,927
16년 전 조회 4,551
16년 전 조회 4,341
16년 전 조회 5,760
16년 전 조회 3,986
16년 전 조회 2,340
16년 전 조회 2,325
16년 전 조회 2,460
16년 전 조회 2,148
16년 전 조회 4,589
16년 전 조회 3,494
16년 전 조회 2,652
16년 전 조회 2,250
16년 전 조회 2,437
16년 전 조회 2,947
16년 전 조회 2,040
16년 전 조회 2,960
16년 전 조회 2,283
16년 전 조회 2,412
16년 전 조회 2,031
16년 전 조회 2,743
16년 전 조회 2,069
16년 전 조회 2,491
16년 전 조회 2,670
16년 전 조회 1,742
16년 전 조회 1,802
16년 전 조회 2,467
16년 전 조회 5,885
16년 전 조회 2,201
16년 전 조회 2,729
16년 전 조회 2,910
16년 전 조회 2,062
16년 전 조회 1,845
16년 전 조회 2,774
16년 전 조회 5,485
16년 전 조회 2,763
16년 전 조회 3,421
16년 전 조회 2,272
16년 전 조회 4,180
16년 전 조회 4,969
16년 전 조회 3,613
16년 전 조회 2,866
16년 전 조회 2,987
16년 전 조회 3,194
16년 전 조회 2,715
16년 전 조회 6,073
16년 전 조회 3,895
16년 전 조회 1,881
16년 전 조회 2,218
16년 전 조회 5,578
16년 전 조회 2,824
16년 전 조회 3,908