我有一些像下面这样的代码。我需要它,所以当我在'选择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