<!DOCTYPE html>
<html>
<head>
<title>HW4</title>
<script>
function myFunction() {
let source = document.getElementById("numb").value;
var image = document.getElementsByClassName("image1");
image.src = source;
var valuey = valuey.valuey.options[0];
var valuex = valuex.valuex.options[0];
switch(valuey) {
case 100:
image.style.width = '100px';
case 200:
image.style.width = '200px';
case 300:
image.style.width = '300px';
}
switch(valuex) {
case 100:
image.style.height = '100px';
case 200:
image.style.height= '200px';
case 300:
image.style.height = '300px';
}
}
</script>
</head>
<body>
<input id="numb">
<img id="image1">
<form name="valuey">
<select name="valuey" id="valuey">
<option valuey="100">100</option>
<option valuey="200">200</option>
<option valuey="300">300</option>
</select>
</form>
<form name="valuex">
<select name="valuex" id="valuex">
<option valuex="100">100</option>
<option valuex="200">200</option>
<option valuex="300">300</option>
</select>
</form>
<button type="button" onclick="myFunction()">Submit</button>
</body>
</html>
</body>
var valuey = valuey.valuey.options[0];
var valuex = valuex.valuex.options[0];
Здесь неверное обращение valuex.options[0];