-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
137 lines (129 loc) · 4.11 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="./bootstrap.min.css" rel="stylesheet" />
<style>
.error input,
.error textarea {
border: 1px solid red;
}
.error {
color: red;
}
</style>
</head>
<body style="padding-top: 100px;">
<div class="container">
<div class="row">
<!-- форма для отправки сообщений -->
<div class="col-md-4">
<form name="pullform" class="form-horizontal">
<p> Форма для отправки </p>
<div class="form-group">
<label for="firstname" class="col-sm-4 control-label">Имя:</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="firstname"/>
</div>
</div>
<div class="form-group">
<label for="lastname" class="col-sm-4 control-label">Фамилия:</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="lastname"/>
</div>
</div>
<div class="form-group">
<label for="patronymic" class="col-sm-4 control-label">Отчество:</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="patronymic"/>
</div>
</div>
<div class="form-group">
<label for="age" class="col-sm-4 control-label">Возраст:</label>
<div class="col-sm-8">
<input type="number" class="form-control" name="age"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<button type="submit" id="b-pull" class="btn btn-default">Отправить</button>
</div>
</div>
</form>
</div>
<!-- настройки транспорта -->
<div class="col-md-4" style="margin-bottom: 20px;">
<div class="center-block">
<p> Транспорт </p>
<div
type="button"
class="btn btn-default active"
id="b-xhr"
style="display: block;"
onclick="XHR()"
>XMLHttpRequest</div>
<div
type="button"
class="btn btn-default"
id="b-w"
style="display: block;"
onclick="WS()"
>WebSocket</div>
<p class="bg-danger hidden text-center" id="allert-w">WebSocket в этом браузере не поддерживается.</p>
<div
type="button"
class="btn btn-default"
id="b-sse"
style="display: block;"
onclick="SSE()"
>ServerSideEvents</div>
</div>
</div>
<!-- форма для приема сообщений -->
<div class="col-md-4">
<form name="pushform" class="form-horizontal">
<p>Текущая информация </p>
<div class="form-group">
<label for="firstname" class="col-sm-4 control-label">Имя:</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="firstname" readonly/>
</div>
</div>
<div class="form-group">
<label for="lastname" class="col-sm-4 control-label">Фамилия:</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="lastname" readonly/>
</div>
</div>
<div class="form-group">
<label for="patronymic" class="col-sm-4 control-label">Отчество:</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="patronymic" readonly/>
</div>
</div>
<div class="form-group">
<label for="cash" class="col-sm-4 control-label">Баланс:</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="cash" readonly/>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<button type="submit" id="b-push" class="btn btn-default">Запрос</button>
</div>
</div>
</form>
</div>
</div>
<div class="row">
<!-- здесь будет выводиться лог-->
<div class="form-group">
<label for="log">Лог:</label>
<textarea class="form-control" rows="15" readonly id="log"></textarea>
</div>
</div>
</div>
<script src="browser.js"></script>
</body>
</html>