The history of today's JSON interface, shared to everyone, data from Wiki
Copy Code code as follows:
http://history.sturgeon.mopaas.com//Home
Http://history.sturgeon.mopaas.com/jsonp?callback=? Jsonp interface
Http://history.sturgeon.mopaas.com/jsonp//json Interface
http://history.sturgeon.mopaas.com/jsonp/1@1//January 1 in history
http://history.sturgeon.mopaas.com/1@1//January 1 in history
$.getjson (' http://history.sturgeon.mopaas.com/jsonp?callback=? ', function (data) {
Parsertodayobj (data);
});
function Parsertodayobj (todayobj) {
for (var key in Todayobj) {
if (/^.* born. *$/.test (key)) {
Dobirthday (Todayobj[key]);
}
if (/^.* holiday. *$/.test (key)) {
Doholiday (Todayobj[key]);
}
if (/^.* Custom. *$/.test (key)) {
Doholiday (Todayobj[key]);
}
if (/^.* death. *$/.test (key)) {
Dodeath (Todayobj[key]);
}
if (/^.*. *$/.test (key)) {
Domemorabilia (Todayobj[key]);
}
}
}
Parsertodayobj (Todayobj);
function Dobirthday (birthdays) {
if (birthdays.length!= 0) {
$ (document.body). Append ("for (var i = 0; i < birthdays.length; i++) {
var birthdayitem = birthdays[i];
$ (document.body). Append ("<p>" +birthdayitem+ "</p>");
};
}
}
function Doholiday (holidays) {
if (holidays.length!= 0) {
$ (document.body). Append ("for (var i = 0; i < holidays.length; i++) {
var item = Holidays[i];
$ (document.body). Append ("<p>" +item+ "</p>");
};
}
}
function Dodeath (deaths) {
if (deaths.length!= 0) {
$ (document.body). Append ("for (var i = 0; i < deaths.length; i++) {
var item = Deaths[i];
$ (document.body). Append ("<p>" +item+ "</p>");
};
}
}
function Domemorabilia (Memorabilias) {
if (memorabilias.length!= 0) {
$ (document.body). Append ("for (var i = 0; i < memorabilias.length; i++) {
var item = Memorabilias[i];
$ (document.body). Append ("<p>" +item+ "</p>");
};
}
}
Copy Code code as follows:
http://history.sturgeon.mopaas.com//Home
Http://history.sturgeon.mopaas.com/jsonp?callback=? Jsonp interface
Http://history.sturgeon.mopaas.com/jsonp//json Interface
http://history.sturgeon.mopaas.com/jsonp/1@1//January 1 in history
http://history.sturgeon.mopaas.com/1@1//January 1 in history
$.getjson (' http://history.sturgeon.mopaas.com/jsonp?callback=? ', function (data) {
Parsertodayobj (data);
});
function Parsertodayobj (todayobj) {
for (var key in Todayobj) {
if (/^.* born. *$/.test (key)) {
Dobirthday (Todayobj[key]);
}
if (/^.* holiday. *$/.test (key)) {
Doholiday (Todayobj[key]);
}
if (/^.* Custom. *$/.test (key)) {
Doholiday (Todayobj[key]);
}
if (/^.* death. *$/.test (key)) {
Dodeath (Todayobj[key]);
}
if (/^.*. *$/.test (key)) {
Domemorabilia (Todayobj[key]);
}
}
}
Parsertodayobj (Todayobj);
function Dobirthday (birthdays) {
if (birthdays.length!= 0) {
$ (document.body). Append ("for (var i = 0; i < birthdays.length; i++) {
var birthdayitem = birthdays[i];
$ (document.body). Append ("<p>" +birthdayitem+ "</p>");
};
}
}
function Doholiday (holidays) {
if (holidays.length!= 0) {
$ (document.body). Append ("for (var i = 0; i < holidays.length; i++) {
var item = Holidays[i];
$ (document.body). Append ("<p>" +item+ "</p>");
};
}
}
function Dodeath (deaths) {
if (deaths.length!= 0) {
$ (document.body). Append ("for (var i = 0; i < deaths.length; i++) {
var item = Deaths[i];
$ (document.body). Append ("<p>" +item+ "</p>");
};
}
}
function Domemorabilia (Memorabilias) {
if (memorabilias.length!= 0) {
$ (document.body). Append ("for (var i = 0; i < memorabilias.length; i++) {
var item = Memorabilias[i];
$ (document.body). Append ("<p>" +item+ "</p>");
};
}
}