리자

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

<!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,658
15년 전 조회 1,782
15년 전 조회 2,044
15년 전 조회 2,041
15년 전 조회 2,034
15년 전 조회 1,521
15년 전 조회 1,765
15년 전 조회 1,908
15년 전 조회 1,839
15년 전 조회 2,526
15년 전 조회 1,694
15년 전 조회 1,793
15년 전 조회 1,291
15년 전 조회 1,392
15년 전 조회 1,386
15년 전 조회 1,340
15년 전 조회 1,287
15년 전 조회 1,333
15년 전 조회 1,476
15년 전 조회 1,516
15년 전 조회 3,007
15년 전 조회 1,341
15년 전 조회 2,000
15년 전 조회 1,878
15년 전 조회 2,011
15년 전 조회 1,707
15년 전 조회 2,213
15년 전 조회 1,029
15년 전 조회 1,488
15년 전 조회 1,466
15년 전 조회 3,254
15년 전 조회 3,600
15년 전 조회 2,275
15년 전 조회 1,760
15년 전 조회 2,365
15년 전 조회 1,857
15년 전 조회 1,483
15년 전 조회 4,171
15년 전 조회 1,823
15년 전 조회 1,904
15년 전 조회 3,174
15년 전 조회 1,863
15년 전 조회 4,562
15년 전 조회 2,763
15년 전 조회 3,547
15년 전 조회 2,180
15년 전 조회 2,418
15년 전 조회 1,699
15년 전 조회 4,756
15년 전 조회 4,390
16년 전 조회 4,192
16년 전 조회 5,601
16년 전 조회 3,830
16년 전 조회 2,186
16년 전 조회 2,148
16년 전 조회 2,292
16년 전 조회 1,995
16년 전 조회 4,407
16년 전 조회 3,330
16년 전 조회 2,481
16년 전 조회 2,084
16년 전 조회 2,278
16년 전 조회 2,779
16년 전 조회 1,852
16년 전 조회 2,780
16년 전 조회 2,114
16년 전 조회 2,242
16년 전 조회 1,882
16년 전 조회 2,593
16년 전 조회 1,893
16년 전 조회 2,316
16년 전 조회 2,484
16년 전 조회 1,581
16년 전 조회 1,638
16년 전 조회 2,289
16년 전 조회 5,704
16년 전 조회 2,022
16년 전 조회 2,534
16년 전 조회 2,724
16년 전 조회 1,885
16년 전 조회 1,660
16년 전 조회 2,592
16년 전 조회 5,311
16년 전 조회 2,578
16년 전 조회 3,246
16년 전 조회 2,104
16년 전 조회 3,989
16년 전 조회 4,809
16년 전 조회 3,441
16년 전 조회 2,700
16년 전 조회 2,810
16년 전 조회 3,027
16년 전 조회 2,569
16년 전 조회 5,902
16년 전 조회 3,734
16년 전 조회 1,713
16년 전 조회 2,060
16년 전 조회 5,424
16년 전 조회 2,690
16년 전 조회 3,754