리자

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

<!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,227
15년 전 조회 1,357
15년 전 조회 1,652
15년 전 조회 1,619
15년 전 조회 1,609
15년 전 조회 1,113
15년 전 조회 1,361
15년 전 조회 1,504
15년 전 조회 1,406
15년 전 조회 2,134
15년 전 조회 1,278
15년 전 조회 1,335
15년 전 조회 882
15년 전 조회 991
15년 전 조회 955
15년 전 조회 920
15년 전 조회 869
15년 전 조회 930
15년 전 조회 1,073
15년 전 조회 1,094
15년 전 조회 2,612
15년 전 조회 939
15년 전 조회 1,590
15년 전 조회 1,461
15년 전 조회 1,583
15년 전 조회 1,292
15년 전 조회 1,779
15년 전 조회 595
15년 전 조회 1,083
15년 전 조회 1,058
15년 전 조회 2,849
15년 전 조회 3,163
15년 전 조회 1,836
15년 전 조회 1,344
15년 전 조회 1,961
15년 전 조회 1,468
15년 전 조회 1,073
15년 전 조회 3,766
15년 전 조회 1,408
15년 전 조회 1,506
15년 전 조회 2,735
15년 전 조회 1,430
15년 전 조회 4,157
15년 전 조회 2,370
15년 전 조회 3,146
15년 전 조회 1,765
15년 전 조회 1,994
15년 전 조회 1,293
15년 전 조회 4,371
15년 전 조회 3,951
15년 전 조회 3,772
15년 전 조회 5,187
15년 전 조회 3,408
15년 전 조회 1,789
15년 전 조회 1,749
15년 전 조회 1,896
15년 전 조회 1,589
15년 전 조회 3,988
15년 전 조회 2,900
15년 전 조회 2,085
15년 전 조회 1,661
15년 전 조회 1,899
15년 전 조회 2,380
15년 전 조회 1,462
15년 전 조회 2,395
15년 전 조회 1,733
15년 전 조회 1,829
15년 전 조회 1,483
15년 전 조회 2,172
15년 전 조회 1,499
15년 전 조회 1,920
16년 전 조회 2,110
16년 전 조회 1,183
16년 전 조회 1,246
16년 전 조회 1,891
16년 전 조회 5,334
16년 전 조회 1,634
16년 전 조회 2,142
16년 전 조회 2,344
16년 전 조회 1,494
16년 전 조회 1,303
16년 전 조회 2,214
16년 전 조회 4,931
16년 전 조회 2,205
16년 전 조회 2,861
16년 전 조회 1,743
16년 전 조회 3,596
16년 전 조회 4,434
16년 전 조회 3,101
16년 전 조회 2,348
16년 전 조회 2,429
16년 전 조회 2,679
16년 전 조회 2,165
16년 전 조회 5,505
16년 전 조회 3,360
16년 전 조회 1,350
16년 전 조회 1,697
16년 전 조회 5,068
16년 전 조회 2,303
16년 전 조회 3,408
🐛 버그신고