16<20) return "";
word = word.substring(pos);
pos = word.indexOf("&");
if(pos>0) word = word.substring(0,pos);
if(word.indexOf("%")!=-1)
return word;
else{
Encode = "UTF-8";
return encodeURIComponent(word);
}
}
//取相关网页
function getAbouts()
{
if(xmlHttpReq==null)xmlHttpReq = AB.getXmlHttp();
var postStr = getWord();
xmlHttpReq.open("POST","/taoke/find_re.xml",true);
xmlHttpReq.setRequestHeader("cache-control","no-cache");
xmlHttpReq.setRequestHeader("Content-Encoding",Encode);
xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttpReq.onreadystatechange=processRequest;
if(postStr!="")
xmlHttpReq.send("word="+postStr);
}
function processRequest()
{
if(xmlHttpReq.readyState==4){
if(xmlHttpReq.status==200){
processResponse();
}
}
}
function processResponse()
{
var xmldom = xmlHttpReq.responseXML;
var word = xmldom.getElementsByTagName("word")[0].firstChild.nodeValue;
var nodes = xmldom.getElementsByTagName("href");
if(nodes.length>0)
{
var list = "
";
$id("AboutTD").innerHTML = list;
form0.q.value = word;
}
}
getAbouts();
| | | | | |
|
| | |