리자

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

<!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,676
15년 전 조회 1,790
15년 전 조회 2,055
15년 전 조회 2,058
15년 전 조회 2,049
15년 전 조회 1,534
15년 전 조회 1,785
15년 전 조회 1,915
15년 전 조회 1,857
15년 전 조회 2,545
15년 전 조회 1,709
15년 전 조회 1,803
15년 전 조회 1,310
15년 전 조회 1,403
15년 전 조회 1,408
15년 전 조회 1,351
15년 전 조회 1,308
15년 전 조회 1,343
15년 전 조회 1,489
15년 전 조회 1,525
15년 전 조회 3,017
15년 전 조회 1,353
15년 전 조회 2,008
15년 전 조회 1,887
15년 전 조회 2,023
15년 전 조회 1,720
15년 전 조회 2,227
15년 전 조회 1,035
15년 전 조회 1,501
15년 전 조회 1,477
15년 전 조회 3,264
15년 전 조회 3,609
15년 전 조회 2,296
15년 전 조회 1,776
15년 전 조회 2,374
15년 전 조회 1,870
15년 전 조회 1,496
15년 전 조회 4,183
15년 전 조회 1,833
15년 전 조회 1,926
15년 전 조회 3,187
15년 전 조회 1,876
15년 전 조회 4,582
15년 전 조회 2,776
15년 전 조회 3,564
15년 전 조회 2,194
15년 전 조회 2,429
15년 전 조회 1,713
15년 전 조회 4,772
15년 전 조회 4,404
16년 전 조회 4,200
16년 전 조회 5,615
16년 전 조회 3,846
16년 전 조회 2,193
16년 전 조회 2,158
16년 전 조회 2,306
16년 전 조회 2,006
16년 전 조회 4,418
16년 전 조회 3,341
16년 전 조회 2,498
16년 전 조회 2,096
16년 전 조회 2,291
16년 전 조회 2,787
16년 전 조회 1,869
16년 전 조회 2,791
16년 전 조회 2,129
16년 전 조회 2,258
16년 전 조회 1,897
16년 전 조회 2,610
16년 전 조회 1,905
16년 전 조회 2,328
16년 전 조회 2,498
16년 전 조회 1,587
16년 전 조회 1,646
16년 전 조회 2,307
16년 전 조회 5,717
16년 전 조회 2,036
16년 전 조회 2,551
16년 전 조회 2,734
16년 전 조회 1,898
16년 전 조회 1,677
16년 전 조회 2,606
16년 전 조회 5,325
16년 전 조회 2,589
16년 전 조회 3,255
16년 전 조회 2,118
16년 전 조회 4,003
16년 전 조회 4,820
16년 전 조회 3,457
16년 전 조회 2,712
16년 전 조회 2,822
16년 전 조회 3,035
16년 전 조회 2,579
16년 전 조회 5,912
16년 전 조회 3,748
16년 전 조회 1,722
16년 전 조회 2,068
16년 전 조회 5,430
16년 전 조회 2,697
16년 전 조회 3,759