简单的站内引用外部搜索

<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()">

原文地址:https://www.cnblogs.com/Dreamfly/p/392261.html