-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathalert_accept.html
More file actions
39 lines (33 loc) · 1.36 KB
/
Copy pathalert_accept.html
File metadata and controls
39 lines (33 loc) · 1.36 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="jquery_min.js"></script>
<meta charset="UTF-8">
<title>Accept alert</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body class="bg-light">
<!-- <form action="alert_redirect.html" method="get" onsubmit="raise_alert('Точно хотите?')"> -->
<form action="alert_redirect.html" method="get">
<div class="form-group" style="margin: 90px 50px 50px 90px;">
<div class="container">
<button type="submit" class="btn btn-primary">I want to go on a magical journey!</button>
</div>
</div>
</form>
<script type="text/javascript">
form_elt = document.querySelector("form");
btn_elt = document.querySelector("button");
btn_elt.addEventListener("click", function(event) {
event.preventDefault();
if (confirm('Are you sure?')) {
form_elt.submit();
};
})
</script>
</body>