<script type="text/javascript">
function showCustomer(str)
document.getElementById("txtHint").innerHTML="";
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest();
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.onreadystatechange=function()
if (xmlhttp.readyState==4 && xmlhttp.status==200)
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
xmlhttp.open("GET","/example/ajax/getcustomer.aspx?q="+str,true);
<form action="" style="margin-top:15px;">
<select name="customers" onchange="showCustomer(this.value)" style="font-family:Verdana, Arial, Helvetica, sans-serif;">
<option value="APPLE">Apple Computer, Inc.</option>
<option value="BAIDU ">BAIDU, Inc</option>
<option value="Canon">Canon USA, Inc.</option>
<option value="Google">Google, Inc.</option>
<option value="Nokia">Nokia Corporation</option>
<option value="SONY">Sony Corporation of America</option>
<div id="txtHint">客户信息将在此处列出 ...</div>