JavaScript を使用して Google にクエリを送信しようとしていますが、ウィンドウがホームページに移動するだけです。
これが私のコードです:
var query = "hello world";
var firstPart = "http://google.com/?=";
window.location.href = firstPart + query;
ページのURLは正しいのですが、結果に行きません。
JavaScript を使用して Google にクエリを送信しようとしていますが、ウィンドウがホームページに移動するだけです。
これが私のコードです:
var query = "hello world";
var firstPart = "http://google.com/?=";
window.location.href = firstPart + query;
ページのURLは正しいのですが、結果に行きません。
変化する:
var firstPart = "http://google.com/?=";
に:
var firstPart = "http://google.com/search?q=";
検索プロトコルを使用します。
https://developers.google.com/search-appliance/documentation/62/xml_reference