Created
April 9, 2015 11:43
-
-
Save AleksandrZhukov/7505382adfa3529c7103 to your computer and use it in GitHub Desktop.
json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><head> | |
<script type="text/javascript"> | |
function loadXMLDoc() | |
{ var xmlhttp; | |
var txt, x, i; | |
if (window.XMLHttpRequest) | |
{ // код для IE7+, Firefox, Chrome, Opera, Safari | |
xmlhttp = new XMLHttpRequest(); | |
} | |
else | |
{ // код для IE6, IE5 | |
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); | |
} | |
xmlhttp.onreadystatechange = function() | |
{ | |
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) | |
{ | |
var obj = JSON.parse(xmlhttp.responseText); | |
document.getElementById("myDiv").innerHTML = obj.faculty.short_name; | |
} | |
} | |
xmlhttp.open("GET","http://cist.kture.kharkov.ua/ias/app/tt/P_API_DEPARTMENTS_JSON?p_id_faculty=95",true); | |
xmlhttp.send(); | |
} | |
</script> | |
</head><body> | |
<div id="myDiv"></div> | |
<input type="button" onclick="loadXMLDoc()">Получить данные</input> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment