我有一些像下面這樣的代碼。我需要它,所以當我在'選擇1'中選擇一個項目時,它會更改第二個組合框中的項目,但我不確定最好的方法。它必須是AJAX還是隻能用Javascript來完成?通過在第一個組合框中的選擇更改組合框中的值
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>
<label for="select1">Select 1</label>
<select name="select1" id="select1">
<option>Item 1</option>
<option>Item 2</option>
<option>Item 3</option>
<option>Item 4</option>
</select>
</p>
<p>
<label for="Select2">Select 2</label>
<select name="Select2" id="Select2">
<option>List 1</option>
<option>List 2</option>
<option>List 3</option>
</select>
</p>
</form>
</body>
</html>
任何提示將不勝感激。湯姆
完美,這就是正是我所需要的。謝謝 – TMB87 2012-01-13 17:02:22