<html> <head> <script type="text/javascript"> function showCustomer(str) { var xmlhttp; if (str=="") { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+,Firefox,Chrome,Opera,Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6,IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","/ajax/getcustomer.asp?q="+str,true); xmlhttp.send(); } </script> </head> <body> <form action="" style="margin-top:15px;"> <label>请选择一位客户: <select name="customers" onchange="showCustomer(this.value)" style="font-family:Verdana,Arial,Helvetica,sans-serif;"> <option value="APPLE">Apple Co
mputer,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> </select> </label> </form> <br /> <div id="txtHint">客户信息将在此处列出 ...</div> </body> </html>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。