Вот все... Нееет, это я передумаю в функцию событие(пытаюсь передать)
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
<title>Добавление</title>
</head>
<body>
<div class="container">
<div class="reg">
<h1>Добавить в базу данных</h1>
<div class="btns__student__and__teacher">
<div class="form-input">
<button class="btn" id="student">Студент</button>
</div>
<div class="form-input">
<button class="btn" id="teacher">Преподаватель</button>
</div>
</div>
<div class="full__name">
<div class="form-input">
<label for="surname">Фамилия</label>
<input id="surname" type="text">
</div>
<div class="form-input">
<label for="name">Имя</label>
<input id="name" type="text">
</div>
<div class="form-input">
<label for="middle__name">Отчество</label>
<input id="middle__name" type="text">
</div>
</div>
<div class="id">
<div class="form-input">
<label for="id__f1">ID</label>
<input id="id__f1" type="text" placeholder="ID #0000">
</div>
<div class="display__block__student">
<div class="form-input">
<label for="group">Группа</label>
<select id="group">
<option>П-41</option>
<option>П-11</option>
<option>ИС-31</option>
</select>
</div>
</div>
</div>
<div class="password__repeat__password">
<div class="form-input">
<label for="password">Пароль</label>
<input id="password" type="password">
</div>
<div class="form-input">
<label for="repeat__password">Повторить пароль</label>
<input id="repeat__password" type="password">
</div>
</div>
<div class="add__user">
<div class="form-input">
<button id="add">Добавить</button>
</div>
</div>
</div>
</div>
<script src="js/script.js"></script>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100%;
height: 100%;
font-family: sans-serif;
}
.container {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
width: 900px;
height: 600px;
margin: 0 auto;
position: absolute;
top: calc(50% - 300px);
left: 0;
right: 0;
}
h1 {
text-transform: uppercase;
letter-spacing: 5px;
font-size: 30px;
color: #93969B;
opacity: 0.8;
padding: 0 0 20px 0;
}
.reg {
width: 700px;
padding: 20px 30px 20px 30px;
text-align: center;
border: 1px solid #93969B;
}
.reg .form-input {
padding: 10px;
font-size: 14px;
letter-spacing: 2px;
}
.reg .form-input input, button, #group {
width: 200px;
padding: 10px;
outline: none;
}
button {
border: none;
background-color: #007FFF;
color: #fff;
font-weight: bold;
cursor: pointer;
transition: 0.4s;
}
.reg .form-input button:hover {
background: #2A52BE;
letter-spacing: 2px;
}
.reg .btns__student__and__teacher, .display__block__student, .full__name, .id, .password__repeat__password {
display: flex;
justify-content: center;
}
.reg .btns__student__and__teacher {
padding: 0 0 20px 0;
}
.reg .password__repeat__password {
display: flex;
flex-direction: column;
align-items: center;
}
.reg .display__block__student {
display: none;
}
.reg .form-input label {
display: flex;
justify-content: flex-start;
padding: 0 0 4px 0;
color: #93969B;
}
.add__user {
padding: 20px 0 0 0;
}
.active {
background: #2A52BE;
}
.red {
border: 2px solid red;
}
::-webkit-input-placeholder { /* WebKit browsers */
color: #93969B;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #93969B;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #93969B;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
color: #93969B;
}