리자

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

<!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,254
15년 전 조회 1,385
15년 전 조회 1,688
15년 전 조회 1,649
15년 전 조회 1,637
15년 전 조회 1,134
15년 전 조회 1,387
15년 전 조회 1,525
15년 전 조회 1,441
15년 전 조회 2,158
15년 전 조회 1,304
15년 전 조회 1,361
15년 전 조회 914
15년 전 조회 1,017
15년 전 조회 987
15년 전 조회 945
15년 전 조회 895
15년 전 조회 958
15년 전 조회 1,102
15년 전 조회 1,112
15년 전 조회 2,637
15년 전 조회 966
15년 전 조회 1,620
15년 전 조회 1,490
15년 전 조회 1,617
15년 전 조회 1,318
15년 전 조회 1,810
15년 전 조회 629
15년 전 조회 1,117
15년 전 조회 1,082
15년 전 조회 2,868
15년 전 조회 3,191
15년 전 조회 1,866
15년 전 조회 1,373
15년 전 조회 1,990
15년 전 조회 1,495
15년 전 조회 1,090
15년 전 조회 3,787
15년 전 조회 1,441
15년 전 조회 1,527
15년 전 조회 2,761
15년 전 조회 1,452
15년 전 조회 4,183
15년 전 조회 2,390
15년 전 조회 3,175
15년 전 조회 1,786
15년 전 조회 2,016
15년 전 조회 1,315
15년 전 조회 4,399
15년 전 조회 3,978
15년 전 조회 3,797
15년 전 조회 5,218
15년 전 조회 3,431
15년 전 조회 1,822
15년 전 조회 1,774
15년 전 조회 1,924
15년 전 조회 1,611
15년 전 조회 4,011
15년 전 조회 2,930
15년 전 조회 2,107
15년 전 조회 1,690
15년 전 조회 1,924
15년 전 조회 2,412
15년 전 조회 1,487
16년 전 조회 2,422
16년 전 조회 1,753
16년 전 조회 1,854
16년 전 조회 1,505
16년 전 조회 2,201
16년 전 조회 1,529
16년 전 조회 1,943
16년 전 조회 2,130
16년 전 조회 1,201
16년 전 조회 1,272
16년 전 조회 1,917
16년 전 조회 5,360
16년 전 조회 1,659
16년 전 조회 2,172
16년 전 조회 2,363
16년 전 조회 1,523
16년 전 조회 1,325
16년 전 조회 2,241
16년 전 조회 4,957
16년 전 조회 2,228
16년 전 조회 2,888
16년 전 조회 1,766
16년 전 조회 3,621
16년 전 조회 4,456
16년 전 조회 3,120
16년 전 조회 2,366
16년 전 조회 2,457
16년 전 조회 2,698
16년 전 조회 2,195
16년 전 조회 5,530
16년 전 조회 3,388
16년 전 조회 1,380
16년 전 조회 1,722
16년 전 조회 5,097
16년 전 조회 2,331
16년 전 조회 3,427