beautify html

This commit is contained in:
Ilya Kantor 2015-03-09 19:02:13 +03:00
parent ecf1478e7e
commit 5342f628da
354 changed files with 13965 additions and 9486 deletions

View file

@ -1,40 +1,45 @@
<!DOCTYPE HTML>
<html>
<head><meta charset="utf-8"></head>
<head>
<meta charset="utf-8">
</head>
<body>
<button onclick="loadPhones()" id="button">Загрузить phones.json!</button>
<button onclick="loadPhones()" id="button">Загрузить phones.json!</button>
<script>
function loadPhones() {
<script>
function loadPhones() {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'phones.json', true);
var xhr = new XMLHttpRequest();
xhr.open('GET', 'phones.json', true);
xhr.send();
xhr.send();
xhr.onreadystatechange = function() {
if (xhr.readyState != 4) return;
button.innerHTML = 'Готово!';
if (xhr.status != 200) {
// обработать ошибку
alert(xhr.status + ': ' + xhr.statusText);
} else {
// вывести результат
alert(xhr.responseText);
xhr.onreadystatechange = function() {
if (xhr.readyState != 4) return;
button.innerHTML = 'Готово!';
if (xhr.status != 200) {
// обработать ошибку
alert(xhr.status + ': ' + xhr.statusText);
} else {
// вывести результат
alert(xhr.responseText);
}
}
button.innerHTML = 'Загружаю...';
button.disabled = true;
}
}
button.innerHTML = 'Загружаю...';
button.disabled = true;
}
</script>
</script>
</body>
</html>
</html>