-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
42 lines (37 loc) · 919 Bytes
/
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
<html>
<head>
<title> ajax demo</title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="bootstrap.js"></script>
</head>
<body>
this is ajax demo
<input class= "form-control" type="text" name="usn">
<p id="gha"> </p>
<script >
$(document).ready(function(){
/* var gh =$.ajax({
url: "https://api.github.com/users/Ankit-Kulkarni",
statusCode: {
404: function() {
alert( "page not found" );
}
},
context: document.body
}).done(function() {
alert("hello");
});
console.log(gh);*/
$.ajax({
url: "http://fiddle.jshell.net/favicon.png"
})
.done(function( data ) {
if ( console && console.log ) {
console.log( "Sample of data:", data.slice( 0, 100 ) );
}
});
});
</script>
</body>
</html>