리자

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

<!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,236
15년 전 조회 1,364
15년 전 조회 1,665
15년 전 조회 1,626
15년 전 조회 1,620
15년 전 조회 1,121
15년 전 조회 1,366
15년 전 조회 1,509
15년 전 조회 1,413
15년 전 조회 2,140
15년 전 조회 1,286
15년 전 조회 1,344
15년 전 조회 891
15년 전 조회 1,000
15년 전 조회 962
15년 전 조회 929
15년 전 조회 878
15년 전 조회 941
15년 전 조회 1,081
15년 전 조회 1,102
15년 전 조회 2,622
15년 전 조회 948
15년 전 조회 1,602
15년 전 조회 1,469
15년 전 조회 1,597
15년 전 조회 1,300
15년 전 조회 1,789
15년 전 조회 605
15년 전 조회 1,096
15년 전 조회 1,062
15년 전 조회 2,856
15년 전 조회 3,173
15년 전 조회 1,847
15년 전 조회 1,352
15년 전 조회 1,973
15년 전 조회 1,476
15년 전 조회 1,080
15년 전 조회 3,776
15년 전 조회 1,420
15년 전 조회 1,514
15년 전 조회 2,742
15년 전 조회 1,439
15년 전 조회 4,166
15년 전 조회 2,380
15년 전 조회 3,156
15년 전 조회 1,773
15년 전 조회 2,002
15년 전 조회 1,304
15년 전 조회 4,381
15년 전 조회 3,958
15년 전 조회 3,782
15년 전 조회 5,197
15년 전 조회 3,421
15년 전 조회 1,800
15년 전 조회 1,760
15년 전 조회 1,905
15년 전 조회 1,598
15년 전 조회 3,998
15년 전 조회 2,910
15년 전 조회 2,092
15년 전 조회 1,673
15년 전 조회 1,908
15년 전 조회 2,390
15년 전 조회 1,470
15년 전 조회 2,406
15년 전 조회 1,739
15년 전 조회 1,839
15년 전 조회 1,493
15년 전 조회 2,176
15년 전 조회 1,510
15년 전 조회 1,925
16년 전 조회 2,115
16년 전 조회 1,188
16년 전 조회 1,254
16년 전 조회 1,902
16년 전 조회 5,342
16년 전 조회 1,641
16년 전 조회 2,152
16년 전 조회 2,350
16년 전 조회 1,505
16년 전 조회 1,310
16년 전 조회 2,226
16년 전 조회 4,938
16년 전 조회 2,214
16년 전 조회 2,870
16년 전 조회 1,754
16년 전 조회 3,606
16년 전 조회 4,444
16년 전 조회 3,108
16년 전 조회 2,354
16년 전 조회 2,438
16년 전 조회 2,686
16년 전 조회 2,174
16년 전 조회 5,515
16년 전 조회 3,372
16년 전 조회 1,363
16년 전 조회 1,705
16년 전 조회 5,078
16년 전 조회 2,312
16년 전 조회 3,416
🐛 버그신고