<html> <head> <meta http-equiv="Content-Type"content="text/html; charset=gb2312"/> <title>无标题文档</title> <scriptlanguage="javascript"> //var ab = new Array(); var xmlHttp;
function createXMLHttpRequest(){
if (window.ActiveXObject){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }
else if (window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest(); } }
function startRequest(){
createXMLHttpRequest();
xmlHttp.onreadystatechange = handleStateChange;
document.getElementById('select2').options.length = 0; var url = document.form1.select1.value; var qurl ="getCities.php?countryCode="+url+"&time="+new Date().getTime();
xmlHttp.open("GET", qurl, true);
xmlHttp.send(null); //setTimeout("startRequest()",2000); }
function handleStateChange(){
if(xmlHttp.readyState == 4){
if(xmlHttp.status == 200){ var obj = document.getElementById('select2');
eval(xmlHttp.responseText);
case"no": echo"obj.options[obj.options.length] = new Option('Bergen','1');\n"; echo"obj.options[obj.options.length] = new Option('Haugesund','2');\n"; echo"obj.options[obj.options.length] = new Option('Oslo','3');\n"; echo"obj.options[obj.options.length] = new Option('Stavanger','4');\n";
break; case"dk":
echo"obj.options[obj.options.length] = new Option('Aalborg','11');\n"; echo"obj.options[obj.options.length] = new Option('Copenhagen','12');\n"; echo"obj.options[obj.options.length] = new Option('Odense','13');\n";
break; case"us":
echo"obj.options[obj.options.length] = new Option('Atlanta','21');\n"; echo"obj.options[obj.options.length] = new Option('Chicago','22');\n"; echo"obj.options[obj.options.length] = new Option('Denver','23');\n"; echo"obj.options[obj.options.length] = new Option('Los Angeles','24');\n"; echo"obj.options[obj.options.length] = new Option('New York','25');\n"; echo"obj.options[obj.options.length] = new Option('San Fransisco','26');\n"; echo"obj.options[obj.options.length] = new Option('Seattle','27');\n";