리자

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

<!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,563
15년 전 조회 1,650
15년 전 조회 1,916
15년 전 조회 1,900
15년 전 조회 1,888
15년 전 조회 1,386
15년 전 조회 1,629
15년 전 조회 1,777
15년 전 조회 1,684
15년 전 조회 2,395
15년 전 조회 1,558
15년 전 조회 1,683
15년 전 조회 1,158
15년 전 조회 1,257
15년 전 조회 1,242
15년 전 조회 1,205
15년 전 조회 1,142
15년 전 조회 1,192
15년 전 조회 1,337
15년 전 조회 1,376
15년 전 조회 2,881
15년 전 조회 1,208
15년 전 조회 1,866
15년 전 조회 1,744
15년 전 조회 1,860
15년 전 조회 1,572
15년 전 조회 2,063
15년 전 조회 879
15년 전 조회 1,342
15년 전 조회 1,325
15년 전 조회 3,099
15년 전 조회 3,485
15년 전 조회 2,171
15년 전 조회 1,611
15년 전 조회 2,231
15년 전 조회 1,723
15년 전 조회 1,347
15년 전 조회 4,037
15년 전 조회 1,695
15년 전 조회 1,770
15년 전 조회 3,054
15년 전 조회 1,747
15년 전 조회 4,427
15년 전 조회 2,632
15년 전 조회 3,408
15년 전 조회 2,043
15년 전 조회 2,273
15년 전 조회 1,556
15년 전 조회 4,618
15년 전 조회 4,273
15년 전 조회 4,070
15년 전 조회 5,456
15년 전 조회 3,698
15년 전 조회 2,058
15년 전 조회 2,006
15년 전 조회 2,150
16년 전 조회 1,853
16년 전 조회 4,294
16년 전 조회 3,179
16년 전 조회 2,346
16년 전 조회 1,933
16년 전 조회 2,139
16년 전 조회 2,642
16년 전 조회 1,719
16년 전 조회 2,642
16년 전 조회 1,967
16년 전 조회 2,101
16년 전 조회 1,747
16년 전 조회 2,443
16년 전 조회 1,764
16년 전 조회 2,189
16년 전 조회 2,351
16년 전 조회 1,440
16년 전 조회 1,507
16년 전 조회 2,156
16년 전 조회 5,575
16년 전 조회 1,879
16년 전 조회 2,400
16년 전 조회 2,600
16년 전 조회 1,751
16년 전 조회 1,542
16년 전 조회 2,458
16년 전 조회 5,172
16년 전 조회 2,447
16년 전 조회 3,108
16년 전 조회 1,977
16년 전 조회 3,847
16년 전 조회 4,687
16년 전 조회 3,334
16년 전 조회 2,567
16년 전 조회 2,662
16년 전 조회 2,903
16년 전 조회 2,412
16년 전 조회 5,797
16년 전 조회 3,602
16년 전 조회 1,593
16년 전 조회 1,935
16년 전 조회 5,299
16년 전 조회 2,557
16년 전 조회 3,631