리자

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

<!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,317
15년 전 조회 1,441
15년 전 조회 1,732
15년 전 조회 1,705
15년 전 조회 1,704
15년 전 조회 1,203
15년 전 조회 1,441
15년 전 조회 1,578
15년 전 조회 1,497
15년 전 조회 2,211
15년 전 조회 1,355
15년 전 조회 1,425
15년 전 조회 973
15년 전 조회 1,066
15년 전 조회 1,040
15년 전 조회 993
15년 전 조회 946
15년 전 조회 1,014
15년 전 조회 1,153
15년 전 조회 1,164
15년 전 조회 2,701
15년 전 조회 1,018
15년 전 조회 1,671
15년 전 조회 1,540
15년 전 조회 1,669
15년 전 조회 1,373
15년 전 조회 1,871
15년 전 조회 678
15년 전 조회 1,166
15년 전 조회 1,135
15년 전 조회 2,924
15년 전 조회 3,244
15년 전 조회 1,915
15년 전 조회 1,429
15년 전 조회 2,037
15년 전 조회 1,554
15년 전 조회 1,151
15년 전 조회 3,844
15년 전 조회 1,486
15년 전 조회 1,588
15년 전 조회 2,809
15년 전 조회 1,503
15년 전 조회 4,235
15년 전 조회 2,452
15년 전 조회 3,226
15년 전 조회 1,838
15년 전 조회 2,070
15년 전 조회 1,373
15년 전 조회 4,446
15년 전 조회 4,030
15년 전 조회 3,855
15년 전 조회 5,271
15년 전 조회 3,497
15년 전 조회 1,878
15년 전 조회 1,816
15년 전 조회 1,962
15년 전 조회 1,668
15년 전 조회 4,063
15년 전 조회 2,989
15년 전 조회 2,156
16년 전 조회 1,745
16년 전 조회 1,979
16년 전 조회 2,464
16년 전 조회 1,536
16년 전 조회 2,472
16년 전 조회 1,804
16년 전 조회 1,911
16년 전 조회 1,546
16년 전 조회 2,255
16년 전 조회 1,580
16년 전 조회 1,994
16년 전 조회 2,182
16년 전 조회 1,250
16년 전 조회 1,323
16년 전 조회 1,968
16년 전 조회 5,406
16년 전 조회 1,712
16년 전 조회 2,232
16년 전 조회 2,428
16년 전 조회 1,571
16년 전 조회 1,372
16년 전 조회 2,295
16년 전 조회 5,009
16년 전 조회 2,281
16년 전 조회 2,934
16년 전 조회 1,820
16년 전 조회 3,666
16년 전 조회 4,510
16년 전 조회 3,161
16년 전 조회 2,418
16년 전 조회 2,509
16년 전 조회 2,751
16년 전 조회 2,245
16년 전 조회 5,584
16년 전 조회 3,436
16년 전 조회 1,429
16년 전 조회 1,771
16년 전 조회 5,145
16년 전 조회 2,386
16년 전 조회 3,481