first.html
second.jsp
-----------------
first.html
<!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>
<title> »ñÈ¡XMLHttpRuquestËùÓÐÇëÇóÍ· </title>
<meta name="author" content="Yeeku.H.Lee" />
<meta name="website" content="http://www.leegang.org" />
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
</head>
<body>
<select name="first" id="first" size="3"
onchange="change(this.value);">
<option value="1" selected="selected">Öйú </option>
<option value="2">ÃÀ¹ú </option>
<option value="3">ÈÕ±¾ </option>
</select>
<select id="second" size="3"> </select>
<script type="text/javascript">
//¶¨ÒåÁËXMLHttpRequest¶ÔÏó
var xmlrequest;
//Íê³ÉXMLHttpRequest¶ÔÏóµÄ³õʼ»¯
function createXMLHttpRequest()
{
if(window.XMLHttpRequest)
{
//DOM 2ä¯ÀÀÆ÷
xmlrequest = new XMLHttpRequest();
}
ÔÚÓÃÊ¡ÊÐÁª¶¯µÄʱºò£¬¸ù¾ÝʡȡÊУ¬ÊÐÊÇͨ¹ýajaxÈ¡³öÀ´µÄ£¬Óúǫ́´úÂëÈ´ÎÞ·¨»ñÈ¡dropdownlistÖÐÊеÄÑ¡ÖÐÏîÖµ£¬Õâ¸ö¸ÃÔõô´¦Àí£¿
Request.Form["ÄãµÄdropdownlist id"]
Request["dropdowlist2" ......