리자

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

<!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,803
15년 전 조회 1,921
15년 전 조회 2,200
15년 전 조회 2,188
15년 전 조회 2,185
15년 전 조회 1,660
15년 전 조회 1,906
15년 전 조회 2,034
15년 전 조회 1,989
15년 전 조회 2,686
15년 전 조회 1,832
15년 전 조회 1,931
15년 전 조회 1,432
15년 전 조회 1,539
15년 전 조회 1,531
15년 전 조회 1,466
15년 전 조회 1,432
15년 전 조회 1,468
15년 전 조회 1,619
15년 전 조회 1,646
15년 전 조회 3,150
15년 전 조회 1,481
15년 전 조회 2,127
15년 전 조회 1,981
15년 전 조회 2,143
15년 전 조회 1,854
15년 전 조회 2,352
15년 전 조회 1,151
15년 전 조회 1,632
15년 전 조회 1,605
15년 전 조회 3,401
15년 전 조회 3,745
15년 전 조회 2,437
15년 전 조회 1,886
15년 전 조회 2,512
15년 전 조회 2,001
15년 전 조회 1,619
15년 전 조회 4,314
15년 전 조회 1,964
15년 전 조회 2,041
15년 전 조회 3,301
15년 전 조회 2,010
15년 전 조회 4,709
15년 전 조회 2,900
15년 전 조회 3,701
15년 전 조회 2,306
15년 전 조회 2,553
15년 전 조회 1,845
15년 전 조회 4,906
16년 전 조회 4,518
16년 전 조회 4,313
16년 전 조회 5,732
16년 전 조회 3,961
16년 전 조회 2,316
16년 전 조회 2,289
16년 전 조회 2,427
16년 전 조회 2,130
16년 전 조회 4,559
16년 전 조회 3,456
16년 전 조회 2,619
16년 전 조회 2,218
16년 전 조회 2,415
16년 전 조회 2,919
16년 전 조회 2,012
16년 전 조회 2,930
16년 전 조회 2,259
16년 전 조회 2,381
16년 전 조회 2,006
16년 전 조회 2,717
16년 전 조회 2,039
16년 전 조회 2,460
16년 전 조회 2,640
16년 전 조회 1,709
16년 전 조회 1,770
16년 전 조회 2,442
16년 전 조회 5,858
16년 전 조회 2,168
16년 전 조회 2,696
16년 전 조회 2,878
16년 전 조회 2,033
16년 전 조회 1,822
16년 전 조회 2,741
16년 전 조회 5,462
16년 전 조회 2,732
16년 전 조회 3,389
16년 전 조회 2,250
16년 전 조회 4,139
16년 전 조회 4,935
16년 전 조회 3,585
16년 전 조회 2,839
16년 전 조회 2,955
16년 전 조회 3,164
16년 전 조회 2,684
16년 전 조회 6,036
16년 전 조회 3,861
16년 전 조회 1,856
16년 전 조회 2,186
16년 전 조회 5,554
16년 전 조회 2,803
16년 전 조회 3,878