리자

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

<!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,782
15년 전 조회 1,889
15년 전 조회 2,166
15년 전 조회 2,163
15년 전 조회 2,148
15년 전 조회 1,631
15년 전 조회 1,879
15년 전 조회 2,000
15년 전 조회 1,965
15년 전 조회 2,657
15년 전 조회 1,813
15년 전 조회 1,907
15년 전 조회 1,402
15년 전 조회 1,505
15년 전 조회 1,508
15년 전 조회 1,441
15년 전 조회 1,401
15년 전 조회 1,428
15년 전 조회 1,596
15년 전 조회 1,607
15년 전 조회 3,114
15년 전 조회 1,449
15년 전 조회 2,091
15년 전 조회 1,954
15년 전 조회 2,108
15년 전 조회 1,814
15년 전 조회 2,319
15년 전 조회 1,116
15년 전 조회 1,608
15년 전 조회 1,584
15년 전 조회 3,371
15년 전 조회 3,710
15년 전 조회 2,408
15년 전 조회 1,862
15년 전 조회 2,475
15년 전 조회 1,967
15년 전 조회 1,588
15년 전 조회 4,273
15년 전 조회 1,930
15년 전 조회 2,011
15년 전 조회 3,274
15년 전 조회 1,974
15년 전 조회 4,688
15년 전 조회 2,869
15년 전 조회 3,668
15년 전 조회 2,272
15년 전 조회 2,513
15년 전 조회 1,819
15년 전 조회 4,882
15년 전 조회 4,489
16년 전 조회 4,286
16년 전 조회 5,709
16년 전 조회 3,931
16년 전 조회 2,282
16년 전 조회 2,250
16년 전 조회 2,400
16년 전 조회 2,098
16년 전 조회 4,524
16년 전 조회 3,424
16년 전 조회 2,592
16년 전 조회 2,188
16년 전 조회 2,388
16년 전 조회 2,888
16년 전 조회 1,981
16년 전 조회 2,899
16년 전 조회 2,226
16년 전 조회 2,349
16년 전 조회 1,972
16년 전 조회 2,692
16년 전 조회 2,003
16년 전 조회 2,426
16년 전 조회 2,603
16년 전 조회 1,674
16년 전 조회 1,737
16년 전 조회 2,408
16년 전 조회 5,822
16년 전 조회 2,135
16년 전 조회 2,657
16년 전 조회 2,842
16년 전 조회 2,000
16년 전 조회 1,791
16년 전 조회 2,708
16년 전 조회 5,422
16년 전 조회 2,698
16년 전 조회 3,352
16년 전 조회 2,217
16년 전 조회 4,100
16년 전 조회 4,898
16년 전 조회 3,546
16년 전 조회 2,802
16년 전 조회 2,917
16년 전 조회 3,133
16년 전 조회 2,646
16년 전 조회 5,998
16년 전 조회 3,822
16년 전 조회 1,821
16년 전 조회 2,151
16년 전 조회 5,521
16년 전 조회 2,773
16년 전 조회 3,849