I need to develope a html form, but with 2 types of related fields:
Example
X = 1 cm
Y = 2 cm
or
X = 2cm
Y = 4cm
and so on
Is all this even possible?
Thankk a lot!
This will not be possible with html only. You will need javscript to acomplish that it would look something like this
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function changeContent(){
var x = document.getElementById('x')
var y = document.getElementById('y')
y.selectedIndex = x.selectedIndex;
}
</script>
</head>
<body>
<select id="x" onchange="changeContent()">
<option value="1">1</option>
<option value="2">2</option>
</select>
<select id="y">
<option value="1">2</option>
<option value="2">4</option>
</select>
</body>
</html>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.