改善谷歌搜索功能

时间:2020-05-28 09:57:52

标签: javascript html

我有这段代码可以进行一般的Google搜索,可以更快吗? (当前需要花费很多时间来加载):

function googleSearch() {
  var daText = document.getElementById("searchG").value.replace(' ','+');
  var url = "https://www.google.com/search?q="+ daText + "&safe=active";
  window.location = url;
}
<input type="text" placeholder="Search On Google..." id="searchG"/>
<Button id="btnsearchG" class="topnav search-container" style="width: 40px; position: right; color: #000000; background-color: #ddd; border-radius: 15px;"onClick="googleSearch()" >Go!</button></div>

0 个答案:

没有答案