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,35 +1,40 @@
<!DOCTYPE HTML>
<html>
<head><meta charset="utf-8"></head>
<head>
<meta charset="utf-8">
</head>
<body>
<button onclick="vote()" id="button">Голосовать!</button>
<button onclick="vote()" id="button">Голосовать!</button>
<script>
function vote() {
button.innerHTML = ' ... ';
<script>
function vote() {
button.innerHTML = ' ... ';
var xhr = new XMLHttpRequest();
var xhr = new XMLHttpRequest();
xhr.open('GET', 'vote', true);
xhr.open('GET', 'vote', true);
xhr.onreadystatechange = function() {
if (xhr.readyState != 4) return;
xhr.onreadystatechange = function() {
if (xhr.readyState != 4) return;
if (xhr.status != 200) {
// обработать ошибку
alert('Ошибка ' + xhr.status + ': ' + xhr.statusText);
return;
}
// обработать результат
button.innerHTML = xhr.responseText;
}
xhr.send(null);
if (xhr.status != 200) {
// обработать ошибку
alert('Ошибка ' + xhr.status + ': ' + xhr.statusText);
return;
}
// обработать результат
button.innerHTML = xhr.responseText;
}
xhr.send(null);
}
</script>
</script>
</body>
</html>
</html>