리자

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

<!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,335
15년 전 조회 1,456
15년 전 조회 1,738
15년 전 조회 1,716
15년 전 조회 1,720
15년 전 조회 1,212
15년 전 조회 1,455
15년 전 조회 1,589
15년 전 조회 1,505
15년 전 조회 2,223
15년 전 조회 1,365
15년 전 조회 1,440
15년 전 조회 983
15년 전 조회 1,074
15년 전 조회 1,055
15년 전 조회 1,012
15년 전 조회 958
15년 전 조회 1,030
15년 전 조회 1,168
15년 전 조회 1,183
15년 전 조회 2,710
15년 전 조회 1,022
15년 전 조회 1,686
15년 전 조회 1,549
15년 전 조회 1,683
15년 전 조회 1,384
15년 전 조회 1,880
15년 전 조회 690
15년 전 조회 1,174
15년 전 조회 1,148
15년 전 조회 2,932
15년 전 조회 3,261
15년 전 조회 1,933
15년 전 조회 1,436
15년 전 조회 2,051
15년 전 조회 1,567
15년 전 조회 1,166
15년 전 조회 3,861
15년 전 조회 1,500
15년 전 조회 1,595
15년 전 조회 2,824
15년 전 조회 1,516
15년 전 조회 4,253
15년 전 조회 2,458
15년 전 조회 3,233
15년 전 조회 1,853
15년 전 조회 2,085
15년 전 조회 1,381
15년 전 조회 4,454
15년 전 조회 4,045
15년 전 조회 3,868
15년 전 조회 5,282
15년 전 조회 3,512
15년 전 조회 1,887
15년 전 조회 1,835
15년 전 조회 1,970
15년 전 조회 1,685
15년 전 조회 4,077
15년 전 조회 3,002
15년 전 조회 2,164
16년 전 조회 1,753
16년 전 조회 1,981
16년 전 조회 2,473
16년 전 조회 1,550
16년 전 조회 2,485
16년 전 조회 1,813
16년 전 조회 1,921
16년 전 조회 1,567
16년 전 조회 2,270
16년 전 조회 1,593
16년 전 조회 2,008
16년 전 조회 2,197
16년 전 조회 1,262
16년 전 조회 1,333
16년 전 조회 1,981
16년 전 조회 5,417
16년 전 조회 1,717
16년 전 조회 2,242
16년 전 조회 2,435
16년 전 조회 1,587
16년 전 조회 1,376
16년 전 조회 2,307
16년 전 조회 5,018
16년 전 조회 2,291
16년 전 조회 2,945
16년 전 조회 1,833
16년 전 조회 3,675
16년 전 조회 4,522
16년 전 조회 3,175
16년 전 조회 2,425
16년 전 조회 2,522
16년 전 조회 2,756
16년 전 조회 2,256
16년 전 조회 5,596
16년 전 조회 3,446
16년 전 조회 1,442
16년 전 조회 1,785
16년 전 조회 5,153
16년 전 조회 2,394
16년 전 조회 3,487