Google searchを導入

自分の作ったサイト内での検索が出来る
Google searchの導入です。

まぁ、Google先生から頂いてくればいいんですけど、
一応ソースを。


【HTML】

<html lang="ja">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
div.gsc-control-wrapper-cse form.gsc-search-box gsc-search-box-tools table tbody tr td.gsc-input {
  max-width: 300px;
  background-color: #F99;
}

div.___gcse_0 div.gsc-control-cse gsc-control-cse-ja {
  background-color: #F99;
}
</style>
</head>

<body>
<script>
  (function() {
    var cx = '016265975968839331954:p6mziy47sl4';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>
<gcse:search></gcse:search>
</body>
</html>

今回は短いので、styleもhead内に書いちゃいました。

もっと色々いじれば大きさや位置なども調整出来ますよ。