var xmlHttp=null; |
|
|
|
function showHint(str,keyword) |
|
{ |
|
//alert(str) |
|
//alert(keyword) |
|
keyword=document.getElementById("keyword").value |
|
str=document.getElementById("leib").options[leib.selectedIndex].value |
|
if (str.length==0) |
|
{ |
|
document.getElementById("jg").innerHTML=""; |
|
return; |
|
} |
|
try |
|
{// Firefox, Opera 8.0+, Safari, IE7 |
|
xmlHttp=new XMLHttpRequest(); |
|
} |
|
catch(e) |
|
{// Old IE |
|
try |
|
{ |
|
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); |
|
} |
|
catch(e) |
|
{ |
|
alert ("Your browser does not support XMLHTTP!"); |
|
return; |
|
} |
|
} |
|
var url="jg.asp?q=" + str; |
|
url=url+"&keyword="+keyword; |
|
//alert(url) |
|
xmlHttp.open("GET",url,false); |
|
xmlHttp.send(null); |
|
if(xmlHttp.responseText=="yes") |
|
{ |
|
document.getElementById("jg").innerHTML="是代理商" |
|
} |
|
if(xmlHttp.responseText=="no") |
|
{ |
|
document.getElementById("jg").innerHTML="不是代理商" |
|
} |
|
//document.getElementById("jg").innerHTML=xmlHttp.responseText; |
|
} |