리자

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

<!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,257
15년 전 조회 1,386
15년 전 조회 1,690
15년 전 조회 1,651
15년 전 조회 1,639
15년 전 조회 1,142
15년 전 조회 1,392
15년 전 조회 1,527
15년 전 조회 1,443
15년 전 조회 2,161
15년 전 조회 1,306
15년 전 조회 1,366
15년 전 조회 916
15년 전 조회 1,020
15년 전 조회 989
15년 전 조회 947
15년 전 조회 898
15년 전 조회 960
15년 전 조회 1,102
15년 전 조회 1,118
15년 전 조회 2,641
15년 전 조회 969
15년 전 조회 1,626
15년 전 조회 1,493
15년 전 조회 1,619
15년 전 조회 1,319
15년 전 조회 1,815
15년 전 조회 630
15년 전 조회 1,118
15년 전 조회 1,084
15년 전 조회 2,869
15년 전 조회 3,192
15년 전 조회 1,867
15년 전 조회 1,378
15년 전 조회 1,993
15년 전 조회 1,497
15년 전 조회 1,092
15년 전 조회 3,790
15년 전 조회 1,443
15년 전 조회 1,532
15년 전 조회 2,764
15년 전 조회 1,456
15년 전 조회 4,184
15년 전 조회 2,395
15년 전 조회 3,180
15년 전 조회 1,786
15년 전 조회 2,018
15년 전 조회 1,319
15년 전 조회 4,401
15년 전 조회 3,982
15년 전 조회 3,801
15년 전 조회 5,225
15년 전 조회 3,435
15년 전 조회 1,825
15년 전 조회 1,777
15년 전 조회 1,926
15년 전 조회 1,613
15년 전 조회 4,013
15년 전 조회 2,933
15년 전 조회 2,109
15년 전 조회 1,695
15년 전 조회 1,928
15년 전 조회 2,416
16년 전 조회 1,488
16년 전 조회 2,422
16년 전 조회 1,754
16년 전 조회 1,856
16년 전 조회 1,508
16년 전 조회 2,201
16년 전 조회 1,532
16년 전 조회 1,947
16년 전 조회 2,131
16년 전 조회 1,202
16년 전 조회 1,275
16년 전 조회 1,922
16년 전 조회 5,362
16년 전 조회 1,664
16년 전 조회 2,175
16년 전 조회 2,366
16년 전 조회 1,525
16년 전 조회 1,328
16년 전 조회 2,245
16년 전 조회 4,960
16년 전 조회 2,231
16년 전 조회 2,890
16년 전 조회 1,770
16년 전 조회 3,622
16년 전 조회 4,458
16년 전 조회 3,124
16년 전 조회 2,368
16년 전 조회 2,460
16년 전 조회 2,701
16년 전 조회 2,198
16년 전 조회 5,532
16년 전 조회 3,390
16년 전 조회 1,383
16년 전 조회 1,726
16년 전 조회 5,098
16년 전 조회 2,335
16년 전 조회 3,428