리자

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

<!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,243
15년 전 조회 1,378
15년 전 조회 1,673
15년 전 조회 1,639
15년 전 조회 1,628
15년 전 조회 1,128
15년 전 조회 1,379
15년 전 조회 1,516
15년 전 조회 1,428
15년 전 조회 2,151
15년 전 조회 1,293
15년 전 조회 1,350
15년 전 조회 902
15년 전 조회 1,007
15년 전 조회 975
15년 전 조회 938
15년 전 조회 887
15년 전 조회 951
15년 전 조회 1,090
15년 전 조회 1,106
15년 전 조회 2,627
15년 전 조회 957
15년 전 조회 1,608
15년 전 조회 1,480
15년 전 조회 1,608
15년 전 조회 1,308
15년 전 조회 1,799
15년 전 조회 616
15년 전 조회 1,104
15년 전 조회 1,072
15년 전 조회 2,865
15년 전 조회 3,180
15년 전 조회 1,855
15년 전 조회 1,364
15년 전 조회 1,985
15년 전 조회 1,485
15년 전 조회 1,089
15년 전 조회 3,780
15년 전 조회 1,431
15년 전 조회 1,521
15년 전 조회 2,752
15년 전 조회 1,447
15년 전 조회 4,174
15년 전 조회 2,388
15년 전 조회 3,166
15년 전 조회 1,781
15년 전 조회 2,008
15년 전 조회 1,310
15년 전 조회 4,387
15년 전 조회 3,969
15년 전 조회 3,789
15년 전 조회 5,208
15년 전 조회 3,425
15년 전 조회 1,809
15년 전 조회 1,764
15년 전 조회 1,911
15년 전 조회 1,604
15년 전 조회 4,006
15년 전 조회 2,921
15년 전 조회 2,099
15년 전 조회 1,680
15년 전 조회 1,915
15년 전 조회 2,399
15년 전 조회 1,482
15년 전 조회 2,414
16년 전 조회 1,749
16년 전 조회 1,847
16년 전 조회 1,495
16년 전 조회 2,187
16년 전 조회 1,522
16년 전 조회 1,933
16년 전 조회 2,126
16년 전 조회 1,195
16년 전 조회 1,263
16년 전 조회 1,910
16년 전 조회 5,350
16년 전 조회 1,650
16년 전 조회 2,163
16년 전 조회 2,361
16년 전 조회 1,514
16년 전 조회 1,316
16년 전 조회 2,232
16년 전 조회 4,947
16년 전 조회 2,219
16년 전 조회 2,878
16년 전 조회 1,758
16년 전 조회 3,613
16년 전 조회 4,448
16년 전 조회 3,114
16년 전 조회 2,359
16년 전 조회 2,451
16년 전 조회 2,692
16년 전 조회 2,182
16년 전 조회 5,521
16년 전 조회 3,380
16년 전 조회 1,369
16년 전 조회 1,711
16년 전 조회 5,085
16년 전 조회 2,325
16년 전 조회 3,422