html
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
<!DOCTYPE html>
<html>
<body>
<form>
<div class="checkbox">
<label for="check">Click the button below to checkit or uncheckit:</label>
<input id= "check" type="checkbox">
<div class="tocheck-container">
<!-- Here we have to define the type of the buttons so it dont get reconized as a submit type that would affect the entire input.
Thanks for the answer on the discussion: https://www.sololearn.com/Discuss/3255956/?ref=app -->
<button type="button" class="tocheck" onclick="checkit()">checkit</button>
<button type="button" class="tocheck" onclick="uncheckit()">uncheckit</button>
</div>
</div>
<label for="user-story">Tell your story:</label>
<textarea id="user-story" name="user-story" rows="5" cols="100" required placeholder="Tell your story here.. click confirm button to see the pop-up confirm page"></textarea>
<button onclick="confirmation()">confirm</button>
</form>
<script>
function checkit(){
document.getElementById("check").checked = true;}
function uncheckit() {document.getElementById("check").checked = false;
}
Enter to Rename, Shift+Enter to Preview
css
css
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
body {
}
textarea {
width: 80%;
position: relative;
left: 10%;
}
label, button {
display:block;
text-align:center;
margin: 5px auto;
}
.tocheck-container {
display:flex;
border: 1px solid red;
}
.checkbox {
display: flex;
flex-direction: column ;
margin-bottom:20px;
}
Enter to Rename, Shift+Enter to Preview
js
js
1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run