JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<title>New</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<script>
function event_1() {
var text = document.forms['form1']['select1'];
var text2 = document.forms['form1']['select2'];
text.onchange = function() {
text2.selectedIndex = text.selectedIndex;
}
}
</script>
</head>
<body onload="event_1();">
<form name="form1" onload="event();">
<select name="select1">
<option name="1">test1</option>
<option name="2">test2</option>
<option name="3">test3</option>
</select>
<select name="select2">
<option name="1">test1_2</option>
<option name="2">test2_2</option>
<option name="3">test3_2</option>
</select>
</form>
</body>
</html>