-
Notifications
You must be signed in to change notification settings - Fork 1
/
alert_redirect.html
50 lines (42 loc) · 1.79 KB
/
alert_redirect.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
<!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>Alert redirect</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="" method="get" onsubmit="checkAnswer(input_value, 2304)">
<div class="form-group" style="margin: 90px 50px 50px 90px;">
<div class="container">
<h3 class="timer">
<span class="nowrap" id="timeLeft">Time left:</span>
<span class="nowrap" id="countdown"></span>
</h3>
<h3 style="padding: 20px">
<span id="simple_text"> Math is real magic! </span>
</h3>
<div class="form-group">
<label>
<span class="nowrap"> What is ln(abs(12*sin(x))), where x = </span>
<span class="nowrap" id="input_value"> 10 </span><span>?</span>
</label>
<input class="form-control" name="text" id="answer" type="text" required>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
</body>
<script>
var input_value = Math.floor(Math.random() * 1000) + 1;
document.getElementById("input_value").innerHTML = input_value;
var isFinished = false;
countDown(3);
</script>