几分钟内可以部署的搜索引擎-searchbox

1、searchbox是一个完整的搜索工作,集成了网络爬虫、支持不同文档类型、可应用于多种自然语言,可自定义搜索结果,可用基于浏览器的管理平台对系统全权控制

2、使用了lucene

3、支持17种语言-包括日语、汉语、韩语

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>自定义搜索引擎</title> <style> body { background-color: #f2f2f2; font-family: Arial, sans-serif; } .container { margin: 50px auto; width: 500px; } .search-form { background-color: #fff; border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); padding: 10px; position: relative; } .search-form input[type="text"] { border: none; border-radius: 5px; font-size: 16px; padding: 5px 10px; width: 80%; } .search-form button { background-color: #1abc9c; border: none; border-radius: 5px; color: #fff; cursor: pointer; font-size: 16px; padding: 5px 10px; position: absolute; right: 0; top: 0; } </style> </head> <body> <div class="container"> <div class="search-form"> <input type="text" id="searchBox" placeholder="在这里输入要搜索的内容"> <button onclick="search()">搜索</button> </div> </div> <script> function search() { var searchBox = document.getElementById("searchBox"); var searchEngine = document.querySelector('input[name="searchEngine"]:checked').value; var query = encodeURIComponent(searchBox.value); var url; switch(searchEngine) { case "google": url = "https://www.google.com/search?q=" + query; break; case "baidu": url = "https://www.baidu.com/s?wd=" + query; break; case "bing": url = "https://www.bing.com/search?q=" + query; break; default: url = "https://www.google.com/search?q=" + query; } window.location.href = url; } </script> <div class="container"> <form> <input type="radio" id="google" name="searchEngine" value="google" checked> <label for="google">Google</label> <input type="radio" id="baidu" name="searchEngine" value="baidu"> <label for="baidu">Baidu</label> <input type="radio" id="bing" name="searchEngine" value="bing"> <label for="bing">Bing</label> </form> </div> </body> </html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值