리자

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

<!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,255
15년 전 조회 1,386
15년 전 조회 1,689
15년 전 조회 1,651
15년 전 조회 1,637
15년 전 조회 1,139
15년 전 조회 1,390
15년 전 조회 1,527
15년 전 조회 1,442
15년 전 조회 2,158
15년 전 조회 1,304
15년 전 조회 1,364
15년 전 조회 915
15년 전 조회 1,018
15년 전 조회 988
15년 전 조회 946
15년 전 조회 898
15년 전 조회 959
15년 전 조회 1,102
15년 전 조회 1,113
15년 전 조회 2,638
15년 전 조회 966
15년 전 조회 1,621
15년 전 조회 1,491
15년 전 조회 1,617
15년 전 조회 1,319
15년 전 조회 1,814
15년 전 조회 629
15년 전 조회 1,117
15년 전 조회 1,083
15년 전 조회 2,868
15년 전 조회 3,191
15년 전 조회 1,866
15년 전 조회 1,375
15년 전 조회 1,992
15년 전 조회 1,496
15년 전 조회 1,091
15년 전 조회 3,788
15년 전 조회 1,442
15년 전 조회 1,527
15년 전 조회 2,763
15년 전 조회 1,454
15년 전 조회 4,184
15년 전 조회 2,393
15년 전 조회 3,176
15년 전 조회 1,786
15년 전 조회 2,017
15년 전 조회 1,317
15년 전 조회 4,401
15년 전 조회 3,980
15년 전 조회 3,798
15년 전 조회 5,221
15년 전 조회 3,434
15년 전 조회 1,824
15년 전 조회 1,776
15년 전 조회 1,924
15년 전 조회 1,612
15년 전 조회 4,012
15년 전 조회 2,931
15년 전 조회 2,109
15년 전 조회 1,691
15년 전 조회 1,925
15년 전 조회 2,413
16년 전 조회 1,487
16년 전 조회 2,422
16년 전 조회 1,754
16년 전 조회 1,856
16년 전 조회 1,507
16년 전 조회 2,201
16년 전 조회 1,530
16년 전 조회 1,945
16년 전 조회 2,131
16년 전 조회 1,201
16년 전 조회 1,273
16년 전 조회 1,918
16년 전 조회 5,361
16년 전 조회 1,660
16년 전 조회 2,172
16년 전 조회 2,363
16년 전 조회 1,523
16년 전 조회 1,326
16년 전 조회 2,241
16년 전 조회 4,958
16년 전 조회 2,229
16년 전 조회 2,888
16년 전 조회 1,766
16년 전 조회 3,622
16년 전 조회 4,456
16년 전 조회 3,122
16년 전 조회 2,367
16년 전 조회 2,457
16년 전 조회 2,699
16년 전 조회 2,195
16년 전 조회 5,530
16년 전 조회 3,390
16년 전 조회 1,381
16년 전 조회 1,724
16년 전 조회 5,098
16년 전 조회 2,334
16년 전 조회 3,427