无限精彩,DreamflyIT世界!

有一种执著叫坚持,有一种梦想叫超越!

导航

简单的站内引用外部搜索

Posted on 2006-05-05 22:14  韦忠波  阅读(183)  评论(0编辑  收藏  举报
<script language="javascript">
  function server()
  {
   
   var wd=document.getElementsByName("wd")[0].value;
   var link=document.getElementById("DropDownList1").value+wd;
   window.open(link);
   
  }
  </script>

-----------------------------------------

<asp:DropDownList id="DropDownList1" runat="server">
       <asp:ListItem Value="http://www.baidu.com/s?&word=" Selected="True">百度</asp:ListItem>
       <asp:ListItem Value="http://www.yahoo.com.cn/search?p=">雅虎</asp:ListItem>
       <asp:ListItem Value="http://www.google.com/search?hl=">Google</asp:ListItem>
      </asp:DropDownList>
      <INPUT type="submit" value="搜索" onclick="javascript:server()">