<script language=VBScript>... //create by e2web@e2web.cn Function urldecoding(vstrin) dim i,strreturn,strSpecial strSpecial ="!""#$%&'()*+,/:;<=>?@[]^`{|}~%" strreturn ="" for i =1 to len(vstrin) thischr = mid(vstrin,i,1) if thischr="%" then intasc=eval("&h"+mid(vstrin,i+1,2)) if instr(strSpecial,chr(intasc))>0 then strreturn= strreturn & chr(intasc) i=i+2 else intasc=eval("&h"+mid(vstrin,i+1,2)+mid(vstrin,i+4,2)) strreturn= strreturn & chr(intasc) i=i+5 end if else if thischr="+" then strreturn= strreturn &"" else strreturn= strreturn & thischr end if end if next urldecoding = strreturn end Function Function bytes2BSTR(vIn) strReturn ="" For i =1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode <&H80 Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) *&H100 + CInt(NextCharCode)) i = i +1 End If Next bytes2BSTR = strReturn End Function Function GetURL() set XmlHttp = CreateObject("Microsoft.XMLHTTP") XmlHttp.Open "GET", "http://www.baidu.com/s?word="+search.str.value, false XmlHttp.setRequestHeader "Content-Type","text/XML" XmlHttp.Send dim html html = bytes2BSTR(XmlHttp.responseBody) if instr(html,"http://cache.baidu.com/c?word=")>0 then html=split(html,"<a href=""http://cache.baidu.com/c?word=")(1) html=split(html,"&url=http")(0) html=replace(urldecoding(html),";","") end if search.action="http://download.pchome.net/php/search.php?searchstr="+html search.submit() End Function Function s() search.action="http://download.pchome.net/php/search.php?searchstr="+search.str.value search.submit() End Function </script> <Form name="search" method="POST"> <p><input type="text" name="str" size="26" value="图像处理软件"> <input type="submit" value="分词搜索" name="B1" onclick=GetURL()> <input type="submit" value="普通搜索" name="B2" onclick=s()></Form>