HTML Map jQuery Link jQuery Link
Como integro la barra de busqueda de google en mi sitio web mediante la implementacion de un codigo personalizado | Neculai Fantanaru
ro  fr  en  es  pt  ar  zh  hi  de  ru
Feed share on facebook share on twitter ART 2.0 ART 3.0 ART 4.0 ART 5.0 ART 6.0
Como integro la barra de busqueda de google en mi sitio web mediante la implementacion de un codigo personalizado
On May 06, 2021, in El liderazgo exitoso, by Neculai Fantanaru

--- PASO 1 --- Este es el formulario del cuadro de búsqueda. Copie este código en todas sus páginas html / php. La gente buscará aquí la información


<form action="https://neculaifantanaru.com/search.html" method="get" id="site-search">
    <fieldset>
        <!-- <label for="search">Search in website</label> -->
        <input type="text" name="q" id="q" value="" />
        <button type="submit" class="btn btn-inverse">search</button>
    </fieldset>
</form> 

--- PASO 2 --- Crea una nueva página html llamada search.html. Y agregue este código en la sección <head>, más probablemente antes de </head>:


<script>
  (function() {
    var cx = 'YOUR-NUMBER-CODE';
    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>

YOUR-NUMBER-CODE puede obtenerlo haciendo clic en este enlace https://cse.google.com/cse/all (Aquí debe agregar su nuevo motor de búsqueda. Elija OFF en la opción "Buscar en toda la web" para encontrar resultados solo en su sitio web, no en toda la web.)

Luego agregue este código en la sección <body>, en la misma página search.html


<div class="main-content">
<h1>Search the site</h1>

<gcse:searchbox-only></gcse:searchbox-only>
<gcse:searchresults-only></gcse:searchresults-only>
</div>

 

Eso es todo amigos.

 


Artículos recientes consultados por lectores:

  1. La imagen de una rosa del apogeo del siglo sin edad
  2. Firma tu nombre en mi corazón
  3. Tu sonrisa pintada
  4. Constelación Tatiana

( )

Donate via Paypal

Alternate Text

RECURRENT DONATION

Donate monthly to support
the NeculaiFantanaru.com project

SINGLE DONATION

Donate the desired amount to support
the NeculaiFantanaru.com project

Donate by Bank Transfer

Account Ron: RO34INGB0000999900448439

Open account at ING Bank
Alatura-te Comunitatii Neculai Fantanaru

decoration
Sobre mí | Site Map | Términos y Condiciones | Socios | Feedback | RSS Feeds
© Neculai Fantanaru. All rights reserved.