オートコンプリートを有効にする
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
コントロール パネルで色、フォント、リンク スタイルをカスタマイズする以外に、
アプリのデザインや動作に
カスタム HTML 属性を使って検索ボックスを検索することもできます。
これにより、コントロール パネルの一部の全般設定をオーバーライドできます。
これは、ホームページ上などに検索ボックスを 1 つ表示したい場合に特に便利です。
サイト上で他の人々とは異なる振る舞いをします。
たとえば、Google Chat で予測入力機能を有効または無効にできます。
enableAutoComplete
属性。デフォルトでは
コントロール パネルで予測入力が有効になっている場合は、true
。方法
値を false
に切り替えると、要素の
確認します。
<!-- ご自身のプログラム可能検索エンジン ID をここに挿入 -->
<script async src="https://cse.google.com/cse.js?cx=017643444788069204610:4gvhea_mvga"></script>
<!-- 属性値を「true」に変更してみてくださいまたは「false」-->
<div class="gcse-search" enableAutoComplete="true"></div>
注: 新しく追加、有効にした予測入力が表示されるまでに数時間かかることがあります。
他にも多くのオプションがあります。Google 広告ヘルプセンターの
カスタマイズ オプションを
<ph type="x-smartling-placeholder"></ph>
Programmable Search Element Control API のセクションをご参照ください。
予測入力について詳しくは、予測入力に関するヘルプセンターの記事をご覧ください。
次のステップ
検索結果のカスタマイズに進みます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eCustomize the search box's look, feel, and behavior using custom HTML attributes, overriding general Control Panel settings.\u003c/p\u003e\n"],["\u003cp\u003eControl individual search boxes differently, like enabling or disabling autocomplete for specific instances using the \u003ccode\u003eenableAutoComplete\u003c/code\u003e attribute.\u003c/p\u003e\n"],["\u003cp\u003eExplore additional search box customization options in the Programmable Search Element Control API documentation.\u003c/p\u003e\n"],["\u003cp\u003eNewly enabled or added autocompletions may require several hours to become visible.\u003c/p\u003e\n"],["\u003cp\u003eLearn more about Autocompletions in the dedicated Help Center article.\u003c/p\u003e\n"]]],[],null,["# Enabling Autocomplete\n\nApart from customizing colors, fonts or link style in the [Control Panel](https://programmablesearchengine.google.com),\nit is possible to influence the look and feel and the behavior of\nthe search box via custom HTML attributes.\n\nThis allows you to override some of the general settings from Control Panel.\nIt is especially useful when you want one search box (e.g. one on the homepage)\nto behave differently than other ones on the site.\nFor example, you can enable or disable autocomplete feature using\n`enableAutoComplete` attribute. By default, it is set to\n`true` if autocomplete is enabled in the Control Panel. By\nswitching the value to `false` you can control how the element\nbehaves. \n\\\u003c!-- Insert your own Programmable Search Engine ID here --\\\u003e \\\u003cscript async src=\"https://cse.google.com/cse.js?cx=017643444788069204610:4gvhea_mvga\"\\\u003e\\\u003c/script\\\u003e \\\u003c!-- Try switching the attribute value to \"true\" or \"false\" --\\\u003e \n\n \u003cdiv class=\"gcse-search\" enableAutoComplete=\"true\"\u003e\u003c/div\u003e\n\nNote: Newly enabled or added autocompletions may take several hours to appear.\n\nThere are many more options available. You can read about other search box\ncustomization options in\n[Programmable Search Element Control API](/custom-search/docs/element#supported_attributes) section.\n\nFor more information on Autocompletions, please see the [Help Center article](https://support.google.com/programmable-search/answer/2631081) on Autocomplete.\n\nNext...\n-------\n\nContinue to [Customizing search results](/custom-search/docs/tutorial/customizingresults)."]]