Multiple GCSE's on page at one time.

前端 未结 2 1635
Happy的楠姐
Happy的楠姐 2021-01-23 17:11

Using the new GCSE code like so:

                    // google custom search engine for the whole site
                (function() {
                    var cx          


        
2条回答
  •  庸人自扰
    2021-01-23 17:41

    With Custom Search Element v1 it can be done relatively easy:

    
    
    
    
    Loading
    Loading

    Demo: Multiple Google CSE on the same page
    http://box.galeksic.com/cse.multiple-on-same-page/

    JavaScript API Reference (v1)
    https://developers.google.com/custom-search/docs/js/cselement-reference

    I've tried with v2, but wasn't very successful.

提交回复
热议问题