我需要你的幫助,在選擇框中進行選擇,並顯示所選擇的答案到另一個
我不確定如何去了解以下信息:
如果我選擇顏色綠成第一個選擇框,我需要將選定的選項自動選入第二個選擇框。
你是如何用javascript來完成這項工作的。
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<span>Category:</span>
<br>
<select id="select1">
<option value=""></option>
<option value="RED">RED</option>
<option value="BLUE">BLUE</option>
<option value="GREEN">GREEN</option>
<option value="YELLOW">YELLOW</option>
</select>
<br>
<span>Your selection was:</span>
<br>
<select id="select2">
<option value=""></option>
<option value="RED">RED</option>
<option value="BLUE">BLUE/option>
<option value="GREEN">GREEN</option>
<option value="YELLOW">YELLOW</option>
</select><b></b>
</body>
</html>
不要告訴我你沒有試過任何東西.... –