-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
61 lines (51 loc) · 1.39 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Events</title>
</head>
<body>
<div>
<h1>jQuery API</h1>
<p> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script></p>
</div>
<div>
<h1>Browser Page Layout</h1>
<p>
<p>Enter the image you want to enter </p>
<input id="box" type="text">
<input id="Button" title="show" onclick="showpics()" type="button" value="show">
<div id="images"></div>
</p>
</div>
<div>
<h1>Show Picture Function</h1>
<p>
<script type="text/javascript">
function showpics(){
/*var pic= $("#box").val();
$.getJSON('http://api.flickr.com/services/feeds/photos_public.gne?tags='
+pic+"&tagmode=any&format=json&jsoncallback=?",
function(data){ $("#images").hide().html(data).fadeIn('fast');
$.each(data.items, function(i,item) {
$("<img/>").attr("src", item.media.m).appendTo("#images");
});
})*/
var tag= $("#box").val();
$.getJSON(
'http://api.flickr.com/services/feeds/photos_public.gne?tags='
+tag+"&tagmode=any&format=json&jsoncallback=?",
function(data){
$("#images").hide();
$("#images").html(data);
$("#images").fadeIn('slow');
$.each(data.items, function(i,value) {
$("<img/>").attr("src", value.media.m).appendTo("#images");
});
}
)
};
</script>
</p>
</div>
</body>
</html>