리자

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

<!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,582
15년 전 조회 1,674
15년 전 조회 1,934
15년 전 조회 1,920
15년 전 조회 1,912
15년 전 조회 1,408
15년 전 조회 1,653
15년 전 조회 1,798
15년 전 조회 1,710
15년 전 조회 2,416
15년 전 조회 1,583
15년 전 조회 1,705
15년 전 조회 1,179
15년 전 조회 1,282
15년 전 조회 1,266
15년 전 조회 1,227
15년 전 조회 1,170
15년 전 조회 1,219
15년 전 조회 1,357
15년 전 조회 1,398
15년 전 조회 2,900
15년 전 조회 1,233
15년 전 조회 1,882
15년 전 조회 1,763
15년 전 조회 1,885
15년 전 조회 1,588
15년 전 조회 2,089
15년 전 조회 905
15년 전 조회 1,362
15년 전 조회 1,347
15년 전 조회 3,122
15년 전 조회 3,516
15년 전 조회 2,189
15년 전 조회 1,633
15년 전 조회 2,256
15년 전 조회 1,745
15년 전 조회 1,365
15년 전 조회 4,050
15년 전 조회 1,718
15년 전 조회 1,787
15년 전 조회 3,082
15년 전 조회 1,773
15년 전 조회 4,450
15년 전 조회 2,656
15년 전 조회 3,431
15년 전 조회 2,063
15년 전 조회 2,288
15년 전 조회 1,578
15년 전 조회 4,640
15년 전 조회 4,295
15년 전 조회 4,097
15년 전 조회 5,481
15년 전 조회 3,716
15년 전 조회 2,071
16년 전 조회 2,029
16년 전 조회 2,175
16년 전 조회 1,878
16년 전 조회 4,315
16년 전 조회 3,206
16년 전 조회 2,372
16년 전 조회 1,959
16년 전 조회 2,160
16년 전 조회 2,661
16년 전 조회 1,745
16년 전 조회 2,674
16년 전 조회 1,991
16년 전 조회 2,121
16년 전 조회 1,768
16년 전 조회 2,465
16년 전 조회 1,793
16년 전 조회 2,209
16년 전 조회 2,370
16년 전 조회 1,463
16년 전 조회 1,530
16년 전 조회 2,180
16년 전 조회 5,598
16년 전 조회 1,900
16년 전 조회 2,427
16년 전 조회 2,620
16년 전 조회 1,776
16년 전 조회 1,562
16년 전 조회 2,482
16년 전 조회 5,198
16년 전 조회 2,471
16년 전 조회 3,139
16년 전 조회 1,999
16년 전 조회 3,865
16년 전 조회 4,706
16년 전 조회 3,351
16년 전 조회 2,593
16년 전 조회 2,686
16년 전 조회 2,927
16년 전 조회 2,436
16년 전 조회 5,822
16년 전 조회 3,629
16년 전 조회 1,619
16년 전 조회 1,957
16년 전 조회 5,326
16년 전 조회 2,584
16년 전 조회 3,652