beautify html
This commit is contained in:
parent
ecf1478e7e
commit
5342f628da
354 changed files with 13965 additions and 9486 deletions
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue