accountnujen,
как пример одного из вариантов...
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.box {
background: black;
width: 50px;
height: 50px;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function() {
const style = document.querySelector(".box").style,
form = document.querySelector("form"),
btn = document.querySelector("[type='button']");
btn.addEventListener("click", function() {
let color = this.form.color.value;
style.backgroundColor = color;
})
form.addEventListener("submit", function(event) {
event.preventDefault();
alert(this.color.value);
})
});
</script>
</head>
<body>
<form >
<select name="color" id="color">
<option value="blue">blue</option>
<option value="green">green</option>
</select>
<div class="box"></div>
<button type="button">allow</button>
<button>send</button>
</form>
</body>
</html>