리자

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

<!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,286
15년 전 조회 1,419
15년 전 조회 1,713
15년 전 조회 1,680
15년 전 조회 1,675
15년 전 조회 1,172
15년 전 조회 1,417
15년 전 조회 1,550
15년 전 조회 1,470
15년 전 조회 2,183
15년 전 조회 1,335
15년 전 조회 1,398
15년 전 조회 946
15년 전 조회 1,049
15년 전 조회 1,014
15년 전 조회 969
15년 전 조회 925
15년 전 조회 983
15년 전 조회 1,133
15년 전 조회 1,146
15년 전 조회 2,667
15년 전 조회 999
15년 전 조회 1,649
15년 전 조회 1,521
15년 전 조회 1,645
15년 전 조회 1,343
15년 전 조회 1,847
15년 전 조회 657
15년 전 조회 1,142
15년 전 조회 1,112
15년 전 조회 2,885
15년 전 조회 3,221
15년 전 조회 1,887
15년 전 조회 1,405
15년 전 조회 2,015
15년 전 조회 1,523
15년 전 조회 1,119
15년 전 조회 3,811
15년 전 조회 1,466
15년 전 조회 1,559
15년 전 조회 2,785
15년 전 조회 1,477
15년 전 조회 4,204
15년 전 조회 2,420
15년 전 조회 3,203
15년 전 조회 1,812
15년 전 조회 2,044
15년 전 조회 1,353
15년 전 조회 4,426
15년 전 조회 4,001
15년 전 조회 3,825
15년 전 조회 5,246
15년 전 조회 3,472
15년 전 조회 1,855
15년 전 조회 1,801
15년 전 조회 1,945
15년 전 조회 1,642
15년 전 조회 4,039
15년 전 조회 2,966
15년 전 조회 2,137
16년 전 조회 1,722
16년 전 조회 1,956
16년 전 조회 2,441
16년 전 조회 1,517
16년 전 조회 2,445
16년 전 조회 1,781
16년 전 조회 1,886
16년 전 조회 1,533
16년 전 조회 2,230
16년 전 조회 1,561
16년 전 조회 1,974
16년 전 조회 2,157
16년 전 조회 1,230
16년 전 조회 1,299
16년 전 조회 1,945
16년 전 조회 5,389
16년 전 조회 1,689
16년 전 조회 2,209
16년 전 조회 2,394
16년 전 조회 1,551
16년 전 조회 1,355
16년 전 조회 2,277
16년 전 조회 4,990
16년 전 조회 2,259
16년 전 조회 2,920
16년 전 조회 1,797
16년 전 조회 3,648
16년 전 조회 4,489
16년 전 조회 3,141
16년 전 조회 2,398
16년 전 조회 2,486
16년 전 조회 2,729
16년 전 조회 2,217
16년 전 조회 5,559
16년 전 조회 3,410
16년 전 조회 1,407
16년 전 조회 1,745
16년 전 조회 5,118
16년 전 조회 2,365
16년 전 조회 3,455