| `-- [061027]ボディーガードは愛を継ぐ(石川英郎、緑川光、鳥海浩輔、他).zip
| `-- [080521]不埒なモンタージュ[武内健 三宅健太 杉田智和 鈴木達央][2枚組 BK付].zip
| `-- [080725]追われる夜の獣 (野島健児, 黖田崇矢, 高橋広樹).zip
| `-- [080728]好きこそ恋の絶対3 愛こそ明日の絶対(平川大辅×羽多野渉).zip
| `-- [080829]熱情の檻で眠れ[安元洋貴×羽多野渉][192/BKなし].rar
| `-- [080925] セラピストは眠れない [320k+BK+初回特典CD]][羽多野渉×近藤隆 花輪英司].zip
| `-- [081022] 夏目友人帳 1 オリジナルドラマCD (wav+cue+rr3).rar
| `-- [2008.10.24]SEXY EFFECT 96 星期五压制(小西克幸、森川智之).rar
| `-- EGOISM~エゴイズム~[子安武人 中原茂 置鮎龙太郎 堀内贤雄 他][128k 56.1M].zip
| `-- Scarlet(中村悠一、杉田智和、鈴木千尋、羽多野渉).zip
| `-- Story of 365 days chapter.CLUB.rar
| `-- Story of 365 days chapter.DIA.rar
| `-- Story of 365 days chapter.HEART.rar
| `-- S完结纪念应募CD I swear[神谷浩史、小西、中村](KEIGO).rar
| `-- Z/ETA1-2(子安武人、上田祐司).rar
| `-- されど罪人は竜と踊る[谷山紀章 松風雅也 長沢美樹 坂朹尚樹 小林沙苗 大川透 朴路美 斎賀みつき 千葉進歩].rar
| `-- アンバランスな熱[羽多野渉.鈴木達央.鳥海浩輔].rar
| `-- コイノイロ (伊藤健太郎×水島大宙鳥海浩輔×野島裕史).rar
| `-- ハーレムナイト瑠璃色の王冠[鳥海浩輔森川智之綠川光他].rar
| `-- ラブミーテンダー 囁きVoice CD(中原茂,井上和彦,松涛ェムサ).rar
| `-- ラブルートゼロ キャラクターソングCD 孤独マテリアル(衫田智和,中村优一).rar
| `-- 白雨(小武,谷山,铃木,羽多野)(vcwhite).rar
| `-- 腐女子に捧げる 告白CD(緑川光、置鮎龍太郎、竹内幸輔他).rar
| `-- 恋愛DAYS~ひとつ屋根の下[立花慎之介 小野大辅 平川大辅 高桥広树].rar
| `-- 恋に命を賭けるのさ(神谷浩史,中村悠一,谷山紀章,川原慶久).rar
| `-- 秘密のゴミ箱で恋をして[成田剣×鈴木達央].rar
| `-- 生意気な遺伝子 [铃村健一、中原茂、寺岛拓笃、井上和彦、羽多野渉、他].rar
| `-- 是-ZE-~雉も鳴かずば撃たれまい。~.rar
| `-- 水の記憶-伊藤健太郎×千葉進歩(神奈延年x松野太紀).rar
| `-- 透過性戀愛裝置(安元×鈴木達央).rar
| `-- 野蛮なロマンチシスト[武内健 成田剣 葉進歩].rar
| `-- 欲望という名の愛(神谷浩史,黖田崇矢).rar
| `-- 月刊男前図鑑 年下編(阿鸟 00 羽毛 宝宝).rar
| `-- 誰にも愛されない(野島健児、星野貴紀).rar
| `-- 支配する指先(森川X千叶).rar
| `-- 開いてるドアから失礼しますよ(井上×置鮎).rar
源码注释:Linked Custom Search Engines (部分)
google.load('search', '1');
// the cse class encapsulates a left and right search control
// both controls are driven by a shared search form
function cse() {
var searcher;
var options;
var sFormDiv = document.getElementById("searchForm");
var leftScDiv = document.getElementById("leftSearchControl");
var rightScDiv = document.getElementById("rightSearchControl");
// create the search control
this.control = new google.search.SearchControl();
this.control.setResultSetSize(GSearch.LARGE_RESULTSET);
// pref for a cref style custom search engine
//直接使用个性化搜索引擎的XML站点文件
var crefUrl = "http://www.google.com/cse/samples/vegetarian.xml";
// Create and add searchers
// left side cref based searcher, no refinements
searcher = new google.search.WebSearch();
searcher.setSiteRestriction({crefUrl : crefUrl});//限定站点使用个性化搜索引擎,为限定标签
searcher.setUserDefinedLabel("Vegan CSE");
options = new google.search.SearcherOptions();
options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
options.setRoot(leftScDiv);
this.control.addSearcher(searcher, options);
// right side cref based searcher using "recipes" as a refinement
searcher = new google.search.WebSearch();
searcher.setSiteRestriction({crefUrl : crefUrl}, "recipes");//限定站点标签
searcher.setUserDefinedLabel("Recipes");
options = new google.search.SearcherOptions();
options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
options.setRoot(rightScDiv);
this.control.addSearcher(searcher, options);
this.control.draw(sFormDiv);
// execute a starter search
this.control.execute("Pasta Marinara");
}
function OnLoad() {
new cse();
}
google.setOnLoadCallback(OnLoad, true);
// the cse class encapsulates a left and right search control
// both controls are driven by a shared search form
function cse() {
var searcher;
var options;
var sFormDiv = document.getElementById("searchForm");
var leftScDiv = document.getElementById("leftSearchControl");
var rightScDiv = document.getElementById("rightSearchControl");
// create the search control
this.control = new google.search.SearchControl();
this.control.setResultSetSize(GSearch.LARGE_RESULTSET);
// pref for a cref style custom search engine
//直接使用个性化搜索引擎的XML站点文件
var crefUrl = "http://www.google.com/cse/samples/vegetarian.xml";
// Create and add searchers
// left side cref based searcher, no refinements
searcher = new google.search.WebSearch();
searcher.setSiteRestriction({crefUrl : crefUrl});//限定站点使用个性化搜索引擎,为限定标签
searcher.setUserDefinedLabel("Vegan CSE");
options = new google.search.SearcherOptions();
options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
options.setRoot(leftScDiv);
this.control.addSearcher(searcher, options);
// right side cref based searcher using "recipes" as a refinement
searcher = new google.search.WebSearch();
searcher.setSiteRestriction({crefUrl : crefUrl}, "recipes");//限定站点标签
searcher.setUserDefinedLabel("Recipes");
options = new google.search.SearcherOptions();
options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
options.setRoot(rightScDiv);
this.control.addSearcher(searcher, options);
this.control.draw(sFormDiv);
// execute a starter search
this.control.execute("Pasta Marinara");
}
function OnLoad() {
new cse();
}
google.setOnLoadCallback(OnLoad, true);
阅读笔记 Google Example Code:Linked Custom Search Engines
地址:http://www.google.com/uds/samples/cse/cref.html
This sample demonstrates the latest addition to Custom Search Engines, the Linked Custom Search Engine. You will note that we use an object for
Vegan CSE - powered by The Google AJAX Search API and Google Custom Search Engines
结论:针对个性化搜索引擎进行搜索,包括左右两个搜索控件
通过直接使用个性化搜索引擎的站点限定XML文件作为限定站点的输入
左边是针对整个个性化搜索引擎进行搜索
右边是针对个性化搜索引擎下的一个标签进行搜索
存疑:无
可用代码:
var crefUrl = "http://www.google.com/cse/samples/vegetarian.xml";
searcher = new google.search.WebSearch();
searcher.setSiteRestriction({crefUrl : crefUrl});//限定站点使用个性化搜索引擎,为限定标签
searcher.setUserDefinedLabel("Vegan CSE");
This sample demonstrates the latest addition to Custom Search Engines, the Linked Custom Search Engine. You will note that we use an object for
site and in the crefUrl property we supply the url of a Custom Search Engine definition file.Vegan CSE - powered by The Google AJAX Search API and Google Custom Search Engines
结论:针对个性化搜索引擎进行搜索,包括左右两个搜索控件
通过直接使用个性化搜索引擎的站点限定XML文件作为限定站点的输入
左边是针对整个个性化搜索引擎进行搜索
右边是针对个性化搜索引擎下的一个标签进行搜索
存疑:无
可用代码:
var crefUrl = "http://www.google.com/cse/samples/vegetarian.xml";
searcher = new google.search.WebSearch();
searcher.setSiteRestriction({crefUrl : crefUrl});//限定站点使用个性化搜索引擎,为限定标签
searcher.setUserDefinedLabel("Vegan CSE");
源码注释:Custom Search Engine Refinements (部分)
google.load('search', '1');
// the cse class encapsulates a left and right search control
// both controls are driven by a shared search form
function cse() {
var sFormDiv = document.getElementById("searchForm");
var leftScDiv = document.getElementById("leftSearchControl");
var rightScDiv = document.getElementById("rightSearchControl");
// create a left, right search control
// create a custom search form
this.leftControl = new google.search.SearchControl();
this.rightControl = new google.search.SearchControl();
this.searchForm = new google.search.SearchForm(true, sFormDiv);
// bind clear and submit functions
this.searchForm.setOnSubmitCallback(this, cse.prototype.onSubmit);
this.searchForm.setOnClearCallback(this, cse.prototype.onClear);
// set up for large result sets
//设置了搜索结果框大小,以结果显示的链接打开方式(本例选择了在当前窗口打开)
this.leftControl.setResultSetSize(GSearch.LARGE_RESULTSET);
this.rightControl.setResultSetSize(GSearch.LARGE_RESULTSET);
this.leftControl.setLinkTarget(GSearch.LINK_TARGET_SELF);
this.rightControl.setLinkTarget(GSearch.LINK_TARGET_SELF);
var searcher;
var options;
// configure left control
// Site Restrict to CSE ID for Curriculum Search
//搜索定制的个性化搜索引擎,使用该搜索引擎的一个子集,即一个标签下的站点限制
var cseId = "017576662512468239146:omuauf_lfve";
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
//设置了按下more results链接后的页面样式,使用类似于第三个参数给定的站点样式
searcher.setSiteRestriction(cseId, null,
"http://code.google.com/edu/curriculumsearch/results.html?cx=017576662512468239146%3Aomuauf_lfve&q=__QUERY__&sa=Search&client=google-coop-np&cof=FORID%3A9%3BCX%3ACurriculum&hl=__HL__");
searcher.setUserDefinedLabel("Curriculum Search");
options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
this.leftControl.addSearcher(searcher, options);
// configure right control for
// -- Lectures Refinement
// -- Assignments Refinement
// -- Reference Refinement
// -- blog search
// -- web search
// -- news search
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction(cseId, "Lectures");//仅搜索cse下的Lectures标签中的站点
searcher.setUserDefinedLabel("Lectures");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction(cseId, "Assignments");
searcher.setUserDefinedLabel("Assignments");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction(cseId, "Reference");
searcher.setUserDefinedLabel("Reference");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.BlogSearch();
this.rightControl.addSearcher(searcher);
searcher = new google.search.WebSearch();
this.rightControl.addSearcher(searcher);
// draw the left and right controls
// the right control is drawn in tabbed mode
var drawOptions = new google.search.DrawOptions();
drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
this.leftControl.draw(leftScDiv);
this.rightControl.draw(rightScDiv, drawOptions);
// execute a starter search
this.searchForm.execute("RSA Encryption");
}
// when the form fires a submit, grab its
// value and call the left and right control
cse.prototype.onSubmit = function(form) {
var q = form.input.value;
if (q && q!= "") {
this.leftControl.execute(q);
this.rightControl.execute(q);
}
return false;
}
// when the form fires a clear, call the left and right control
cse.prototype.onClear = function(form) {
this.leftControl.clearAllResults();
this.rightControl.clearAllResults();
form.input.value = "";
return false;
}
function OnLoad() {
new cse();
}
google.setOnLoadCallback(OnLoad, true);
// the cse class encapsulates a left and right search control
// both controls are driven by a shared search form
function cse() {
var sFormDiv = document.getElementById("searchForm");
var leftScDiv = document.getElementById("leftSearchControl");
var rightScDiv = document.getElementById("rightSearchControl");
// create a left, right search control
// create a custom search form
this.leftControl = new google.search.SearchControl();
this.rightControl = new google.search.SearchControl();
this.searchForm = new google.search.SearchForm(true, sFormDiv);
// bind clear and submit functions
this.searchForm.setOnSubmitCallback(this, cse.prototype.onSubmit);
this.searchForm.setOnClearCallback(this, cse.prototype.onClear);
// set up for large result sets
//设置了搜索结果框大小,以结果显示的链接打开方式(本例选择了在当前窗口打开)
this.leftControl.setResultSetSize(GSearch.LARGE_RESULTSET);
this.rightControl.setResultSetSize(GSearch.LARGE_RESULTSET);
this.leftControl.setLinkTarget(GSearch.LINK_TARGET_SELF);
this.rightControl.setLinkTarget(GSearch.LINK_TARGET_SELF);
var searcher;
var options;
// configure left control
// Site Restrict to CSE ID for Curriculum Search
//搜索定制的个性化搜索引擎,使用该搜索引擎的一个子集,即一个标签下的站点限制
var cseId = "017576662512468239146:omuauf_lfve";
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
//设置了按下more results链接后的页面样式,使用类似于第三个参数给定的站点样式
searcher.setSiteRestriction(cseId, null,
"http://code.google.com/edu/curriculumsearch/results.html?cx=017576662512468239146%3Aomuauf_lfve&q=__QUERY__&sa=Search&client=google-coop-np&cof=FORID%3A9%3BCX%3ACurriculum&hl=__HL__");
searcher.setUserDefinedLabel("Curriculum Search");
options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
this.leftControl.addSearcher(searcher, options);
// configure right control for
// -- Lectures Refinement
// -- Assignments Refinement
// -- Reference Refinement
// -- blog search
// -- web search
// -- news search
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction(cseId, "Lectures");//仅搜索cse下的Lectures标签中的站点
searcher.setUserDefinedLabel("Lectures");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction(cseId, "Assignments");
searcher.setUserDefinedLabel("Assignments");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction(cseId, "Reference");
searcher.setUserDefinedLabel("Reference");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.BlogSearch();
this.rightControl.addSearcher(searcher);
searcher = new google.search.WebSearch();
this.rightControl.addSearcher(searcher);
// draw the left and right controls
// the right control is drawn in tabbed mode
var drawOptions = new google.search.DrawOptions();
drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
this.leftControl.draw(leftScDiv);
this.rightControl.draw(rightScDiv, drawOptions);
// execute a starter search
this.searchForm.execute("RSA Encryption");
}
// when the form fires a submit, grab its
// value and call the left and right control
cse.prototype.onSubmit = function(form) {
var q = form.input.value;
if (q && q!= "") {
this.leftControl.execute(q);
this.rightControl.execute(q);
}
return false;
}
// when the form fires a clear, call the left and right control
cse.prototype.onClear = function(form) {
this.leftControl.clearAllResults();
this.rightControl.clearAllResults();
form.input.value = "";
return false;
}
function OnLoad() {
new cse();
}
google.setOnLoadCallback(OnLoad, true);
源码注释:Custom Search Engines (部分)
google.load('search', '1');
// the cse class encapsulates a left and right search control
// both controls are driven by a shared search form
function cse() {
//创建变量,分别对应搜索框和左右结果框
var sFormDiv = document.getElementById("searchForm");
var leftScDiv = document.getElementById("leftSearchControl");
var rightScDiv = document.getElementById("rightSearchControl");
// create a left, right search control
// create a custom search form
//创建搜索控件,分别对应左右搜索结果框,和搜索输入框
this.leftControl = new google.search.SearchControl();
this.rightControl = new google.search.SearchControl();
this.searchForm = new google.search.SearchForm(true, sFormDiv);
// bind clear and submit functions
//继续创建searchForm对象的后续两个步骤,提交按钮和清除按钮
this.searchForm.setOnSubmitCallback(this, cse.prototype.onSubmit);
this.searchForm.setOnClearCallback(this, cse.prototype.onClear);
// set up for small result sets
//设置结果集大小
this.leftControl.setResultSetSize(google.search.Search.SMALL_RESULTSET);
this.rightControl.setResultSetSize(google.search.Search.SMALL_RESULTSET);
var searcher;
var options;
// configure left control
// Site Restrict to CSE ID for reviews
//配置左边的搜索引擎,使用定制的个性化搜索引擎作为限定站点
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction("000455696194071821846:reviews");
//该搜索引擎就是000455696194071821846:reviews,其中reviews不是搜索引擎内的标签
searcher.setUserDefinedLabel("Product Reviews");
options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);//设置结果展示模式
this.leftControl.addSearcher(searcher, options);
// configure right control for
// -- cse for comparisons
// -- cse for community
// -- cse for shopping
// -- blog search
// -- news search
//配置右边的搜索引擎,设置了六个搜索引擎
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction("000455696194071821846:comparisons");
searcher.setUserDefinedLabel("Prices");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction("000455696194071821846:community");
searcher.setUserDefinedLabel("Forums");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction("000455696194071821846:shopping");
searcher.setUserDefinedLabel("Shopping");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.BlogSearch();
this.rightControl.addSearcher(searcher);
searcher = new google.search.WebSearch();
this.rightControl.addSearcher(searcher);
searcher = new google.search.NewsSearch();
this.rightControl.addSearcher(searcher);
// draw the left and right controls
// the right control is drawn in tabbed mode
//绘制结果,使用标签模式排列
var drawOptions = new google.search.DrawOptions();
drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
this.leftControl.draw(leftScDiv);
this.rightControl.draw(rightScDiv, drawOptions);
// bind in a videobar
//绑定视频搜索结果显示框,和视频播放框
var videoBarDiv = document.getElementById("videoBar");
var videoPlayerDiv = document.getElementById("videoPlayer")
var vboptions = {
largeResultSet : false,
horizontal : true
}
this.videoBar = new GSvideoBar(videoBarDiv, videoPlayerDiv, vboptions);
//同时设置视频搜索和播放框
// execute a starter search
this.searchForm.execute("Apple iPod");
}
// when the form fires a submit, grab its
// value and call the left and right control
//设置搜索按钮
//当从搜索输入框接收到搜索请求之后,同时调用搜索左右搜索框以及视频搜索框
cse.prototype.onSubmit = function(form) {
var q = form.input.value;
if (q && q!= "") {
this.leftControl.execute(q);
this.rightControl.execute(q);
this.videoBar.execute(q);
}
return false;
}
// when the form fires a clear, call the left and right control
//设置清除按钮
cse.prototype.onClear = function(form) {
this.leftControl.clearAllResults();
this.rightControl.clearAllResults();
this.videoBar.clearAllResults();
form.input.value = "";
return false;
}
function OnLoad() {
new cse();
}
google.setOnLoadCallback(OnLoad, true);
// the cse class encapsulates a left and right search control
// both controls are driven by a shared search form
function cse() {
//创建变量,分别对应搜索框和左右结果框
var sFormDiv = document.getElementById("searchForm");
var leftScDiv = document.getElementById("leftSearchControl");
var rightScDiv = document.getElementById("rightSearchControl");
// create a left, right search control
// create a custom search form
//创建搜索控件,分别对应左右搜索结果框,和搜索输入框
this.leftControl = new google.search.SearchControl();
this.rightControl = new google.search.SearchControl();
this.searchForm = new google.search.SearchForm(true, sFormDiv);
// bind clear and submit functions
//继续创建searchForm对象的后续两个步骤,提交按钮和清除按钮
this.searchForm.setOnSubmitCallback(this, cse.prototype.onSubmit);
this.searchForm.setOnClearCallback(this, cse.prototype.onClear);
// set up for small result sets
//设置结果集大小
this.leftControl.setResultSetSize(google.search.Search.SMALL_RESULTSET);
this.rightControl.setResultSetSize(google.search.Search.SMALL_RESULTSET);
var searcher;
var options;
// configure left control
// Site Restrict to CSE ID for reviews
//配置左边的搜索引擎,使用定制的个性化搜索引擎作为限定站点
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction("000455696194071821846:reviews");
//该搜索引擎就是000455696194071821846:reviews,其中reviews不是搜索引擎内的标签
searcher.setUserDefinedLabel("Product Reviews");
options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);//设置结果展示模式
this.leftControl.addSearcher(searcher, options);
// configure right control for
// -- cse for comparisons
// -- cse for community
// -- cse for shopping
// -- blog search
// -- news search
//配置右边的搜索引擎,设置了六个搜索引擎
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction("000455696194071821846:comparisons");
searcher.setUserDefinedLabel("Prices");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction("000455696194071821846:community");
searcher.setUserDefinedLabel("Forums");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.WebSearch();
options = new google.search.SearcherOptions();
searcher.setSiteRestriction("000455696194071821846:shopping");
searcher.setUserDefinedLabel("Shopping");
this.rightControl.addSearcher(searcher, options);
searcher = new google.search.BlogSearch();
this.rightControl.addSearcher(searcher);
searcher = new google.search.WebSearch();
this.rightControl.addSearcher(searcher);
searcher = new google.search.NewsSearch();
this.rightControl.addSearcher(searcher);
// draw the left and right controls
// the right control is drawn in tabbed mode
//绘制结果,使用标签模式排列
var drawOptions = new google.search.DrawOptions();
drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
this.leftControl.draw(leftScDiv);
this.rightControl.draw(rightScDiv, drawOptions);
// bind in a videobar
//绑定视频搜索结果显示框,和视频播放框
var videoBarDiv = document.getElementById("videoBar");
var videoPlayerDiv = document.getElementById("videoPlayer")
var vboptions = {
largeResultSet : false,
horizontal : true
}
this.videoBar = new GSvideoBar(videoBarDiv, videoPlayerDiv, vboptions);
//同时设置视频搜索和播放框
// execute a starter search
this.searchForm.execute("Apple iPod");
}
// when the form fires a submit, grab its
// value and call the left and right control
//设置搜索按钮
//当从搜索输入框接收到搜索请求之后,同时调用搜索左右搜索框以及视频搜索框
cse.prototype.onSubmit = function(form) {
var q = form.input.value;
if (q && q!= "") {
this.leftControl.execute(q);
this.rightControl.execute(q);
this.videoBar.execute(q);
}
return false;
}
// when the form fires a clear, call the left and right control
//设置清除按钮
cse.prototype.onClear = function(form) {
this.leftControl.clearAllResults();
this.rightControl.clearAllResults();
this.videoBar.clearAllResults();
form.input.value = "";
return false;
}
function OnLoad() {
new cse();
}
google.setOnLoadCallback(OnLoad, true);
源码注释:Site Restricted Search (部分)
//google.load(moduleName, moduleVersion, optionalSettings)该方法可以加载各个 AJAX API
//moduleName 是 API 的名称(例如 "maps" 或 "search")
//version 可以指定 API 模块的版本
//optionalSettings 可以为您作为 JavaScript 对象常量加载的 API 指定所有可选配置选项
google.load('search', '1');
function OnLoad() {
// Dynamically load CSS to override defaults
//配置呈现样式
var css = document.createElement('link');
css.href = '../../css/gsearch_green.css';
css.type = 'text/css';
css.rel = 'stylesheet';
document.getElementsByTagName('head')[0].appendChild(css);
// Create a search control
//创建一个搜索控件
var searchControl = new google.search.SearchControl();
// site restricted web search with custom label
// and class suffix
//限制站点搜索
var siteSearch = new google.search.WebSearch();
siteSearch.setUserDefinedLabel("Amazon.com");
siteSearch.setUserDefinedClassSuffix("siteSearch");
siteSearch.setSiteRestriction("amazon.com");
searchControl.addSearcher(siteSearch);
// site restricted web search using a custom search engine
//使用定制的搜索引擎搜索,下面提交自定义的搜索引擎的号码即可
siteSearch = new google.search.WebSearch();
siteSearch.setUserDefinedLabel("Product Reviews");
siteSearch.setSiteRestriction("000455696194071821846:reviews");
searchControl.addSearcher(siteSearch);
// standard, unrestricted web search
//调用没有限制的google搜索
searchControl.addSearcher(new google.search.WebSearch());
// site restricted blog search
//对限定博客进行博客搜索
var blogSearch = new google.search.BlogSearch();
blogSearch.setUserDefinedLabel("LJ Nintendo DS Blog");
blogSearch.setSiteRestriction("http://community.livejournal.com/nintendo_ds/");
searchControl.addSearcher(blogSearch);
// site restricted news search
//对限定新闻站点进行新闻搜索
var newsSearch = new google.search.NewsSearch();
newsSearch.setUserDefinedLabel("Seattle Times");
newsSearch.setSiteRestriction("Seattle Times");
searchControl.addSearcher(newsSearch);
// Establish a keep callback
//创建后退控件
searchControl.setOnKeepCallback(null, DummyClipSearchResult);
// tell the searcher to draw itself and tell it where to attach
//绘制呈现搜索结果
searchControl.draw(document.getElementById("searchcontrol"));
// execute an inital search
//预设搜索关键字
searchControl.execute("Nintendo DS");
}
function DummyClipSearchResult(result) {}
google.setOnLoadCallback(OnLoad, true);
//moduleName 是 API 的名称(例如 "maps" 或 "search")
//version 可以指定 API 模块的版本
//optionalSettings 可以为您作为 JavaScript 对象常量加载的 API 指定所有可选配置选项
google.load('search', '1');
function OnLoad() {
// Dynamically load CSS to override defaults
//配置呈现样式
var css = document.createElement('link');
css.href = '../../css/gsearch_green.css';
css.type = 'text/css';
css.rel = 'stylesheet';
document.getElementsByTagName('head')[0].appendChild(css);
// Create a search control
//创建一个搜索控件
var searchControl = new google.search.SearchControl();
// site restricted web search with custom label
// and class suffix
//限制站点搜索
var siteSearch = new google.search.WebSearch();
siteSearch.setUserDefinedLabel("Amazon.com");
siteSearch.setUserDefinedClassSuffix("siteSearch");
siteSearch.setSiteRestriction("amazon.com");
searchControl.addSearcher(siteSearch);
// site restricted web search using a custom search engine
//使用定制的搜索引擎搜索,下面提交自定义的搜索引擎的号码即可
siteSearch = new google.search.WebSearch();
siteSearch.setUserDefinedLabel("Product Reviews");
siteSearch.setSiteRestriction("000455696194071821846:reviews");
searchControl.addSearcher(siteSearch);
// standard, unrestricted web search
//调用没有限制的google搜索
searchControl.addSearcher(new google.search.WebSearch());
// site restricted blog search
//对限定博客进行博客搜索
var blogSearch = new google.search.BlogSearch();
blogSearch.setUserDefinedLabel("LJ Nintendo DS Blog");
blogSearch.setSiteRestriction("http://community.livejournal.com/nintendo_ds/");
searchControl.addSearcher(blogSearch);
// site restricted news search
//对限定新闻站点进行新闻搜索
var newsSearch = new google.search.NewsSearch();
newsSearch.setUserDefinedLabel("Seattle Times");
newsSearch.setSiteRestriction("Seattle Times");
searchControl.addSearcher(newsSearch);
// Establish a keep callback
//创建后退控件
searchControl.setOnKeepCallback(null, DummyClipSearchResult);
// tell the searcher to draw itself and tell it where to attach
//绘制呈现搜索结果
searchControl.draw(document.getElementById("searchcontrol"));
// execute an inital search
//预设搜索关键字
searchControl.execute("Nintendo DS");
}
function DummyClipSearchResult(result) {}
google.setOnLoadCallback(OnLoad, true);
阅读笔记 Google Example Code:Custom Search Engine Refinements
地址:http://www.google.com/uds/samples/cse/csearch.html
This sample builds on the sample above by introducing custom search engine refinements. You will note in the calls to
Curriculum Search Sample - powered by The Google AJAX Search API and Google Custom Search Engines
结论:主要针对一个个性化的搜索引擎进行搜索,包括左右两边两个搜索控件
左边的搜索控件针对整个个性化搜索引擎进行搜索,设置了more results 之后的页面样式
右边的搜索引擎包括六个搜索控件,前三个是对个性化搜索引擎的标签限定
存疑:无
可用代码:
google.search.WebSearch控件下的
.setSiteRestriction(site, opt_refinement, opt_moreResultsTemplate)
site:可以针对限定站点,个性化的搜索引擎
opt_refinement:针对个性化搜索引擎,可以进一步限定到一个标签子集
opt_moreResultsTemplate:可以指定按下more results链接后的页面样式模板
This sample builds on the sample above by introducing custom search engine refinements. You will note in the calls to
setSiteRestriction() for the right hand side searcher, the code is using the opt_refinement argument to further restrict the search results within the custom search engine.Curriculum Search Sample - powered by The Google AJAX Search API and Google Custom Search Engines
结论:主要针对一个个性化的搜索引擎进行搜索,包括左右两边两个搜索控件
左边的搜索控件针对整个个性化搜索引擎进行搜索,设置了more results 之后的页面样式
右边的搜索引擎包括六个搜索控件,前三个是对个性化搜索引擎的标签限定
存疑:无
可用代码:
google.search.WebSearch控件下的
.setSiteRestriction(site, opt_refinement, opt_moreResultsTemplate)
site:可以针对限定站点,个性化的搜索引擎
opt_refinement:针对个性化搜索引擎,可以进一步限定到一个标签子集
opt_moreResultsTemplate:可以指定按下more results链接后的页面样式模板
Google Code:google.search.SearchControl()和google.search.SearchForm()
google.search.SearchControl();
//类说明:http://code.google.com/apis/ajaxsearch/documentation/reference.html#_class_GSearchControl
google.search.SearchForm();
//类说明:http://code.google.com/apis/ajaxsearch/documentation/reference.html#_class_GSearchForm
当使用GSearchControl 时,你的应用可以利用集成的“search form”。这个form提供了一个文本输入框、一个搜索按钮、一个清除按钮,还有“google 商标”。如果你的应用不希望使用搜索控制(search control),取而代之的是使用原始的GSearch 层,那么GSearchForm 对象就派上用场了。使用这个对象,可以使你获得实足的自由度优势和集成在搜索控制的search form 商标,但是它作为独立的对象,你需要自己控制它的行为和被放置的位置。
google.search.SearchControl()的基本步骤包括三句:
* sc = new GSearchControl()google.search.SearchControl();
* sc.addSearcher();
* sc.draw();
该对象可用选项(部分):
.setTimeoutInterval(timeoutInterval)
可以设置超时
.setOnKeepCallback(object, method, opt_keepLabel?)
可以启动对结果的处理,启用该选项之后,每个节点下面会出现一个文本链接,点击链接可以执行特殊的操作
包括:保存,保持,引用,复制,等
.setResultSetSize(switchTo)
可以设置搜索结果个数,不是具体的标量,而是大概的数量范围,较多或较少
.setLinkTarget(linkTarget)
可以设置点击链接后新页面显式的位置
包括:在新窗口,在同一窗口或帧,在最高帧,在最高帧或替换当前帧
.setNoResultsString(str)
可以设置搜索无结果时的显示
.inlineCurrentStyle(node, opt_deep?)
可以克隆当前的样式形成一个特殊的HTML节点,并植入当前样式
google.search.SearchForm(enableClear, element)的基本步骤:
* sf = new GSearchFormgoogle.search.SearchForm(true/false, container);
* sf.setOnSubmitCallback(object, method);
* optional - sf.setOnClearCallback(object, method);
本对象提供了一个文本输入框,搜索按钮,可选的清除按钮,以及标准商标,
本对象是对google.search.Search()中对象的一个集成,事实上google.search.SearchControl()对象就是基于本对象的基础上开发的
参数说明:
enableClear:如果为真,则搜索框包含一个清除按钮
element:提供一个HTML节点作为这个搜索框的载体
该对象可用选项(部分):
.setOnSubmitCallback(object, method)
设置点击搜索按钮,或在搜索输入的文本框内键入回车时激活的对象
.setOnClearCallback(object, method)
设置点击清除按钮时,激活的对象
//类说明:http://code.google.com/apis/ajaxsearch/documentation/reference.html#_class_GSearchControl
google.search.SearchForm();
//类说明:http://code.google.com/apis/ajaxsearch/documentation/reference.html#_class_GSearchForm
当使用GSearchControl 时,你的应用可以利用集成的“search form”。这个form提供了一个文本输入框、一个搜索按钮、一个清除按钮,还有“google 商标”。如果你的应用不希望使用搜索控制(search control),取而代之的是使用原始的GSearch 层,那么GSearchForm 对象就派上用场了。使用这个对象,可以使你获得实足的自由度优势和集成在搜索控制的search form 商标,但是它作为独立的对象,你需要自己控制它的行为和被放置的位置。
google.search.SearchControl()的基本步骤包括三句:
* sc = new GSearchControl()google.search.SearchControl();
* sc.addSearcher();
* sc.draw();
该对象可用选项(部分):
.setTimeoutInterval(timeoutInterval)
可以设置超时
.setOnKeepCallback(object, method, opt_keepLabel?)
可以启动对结果的处理,启用该选项之后,每个节点下面会出现一个文本链接,点击链接可以执行特殊的操作
包括:保存,保持,引用,复制,等
.setResultSetSize(switchTo)
可以设置搜索结果个数,不是具体的标量,而是大概的数量范围,较多或较少
.setLinkTarget(linkTarget)
可以设置点击链接后新页面显式的位置
包括:在新窗口,在同一窗口或帧,在最高帧,在最高帧或替换当前帧
.setNoResultsString(str)
可以设置搜索无结果时的显示
.inlineCurrentStyle(node, opt_deep?)
可以克隆当前的样式形成一个特殊的HTML节点,并植入当前样式
google.search.SearchForm(enableClear, element)的基本步骤:
* sf = new GSearchFormgoogle.search.SearchForm(true/false, container);
* sf.setOnSubmitCallback(object, method);
* optional - sf.setOnClearCallback(object, method);
本对象提供了一个文本输入框,搜索按钮,可选的清除按钮,以及标准商标,
本对象是对google.search.Search()中对象的一个集成,事实上google.search.SearchControl()对象就是基于本对象的基础上开发的
参数说明:
enableClear:如果为真,则搜索框包含一个清除按钮
element:提供一个HTML节点作为这个搜索框的载体
该对象可用选项(部分):
.setOnSubmitCallback(object, method)
设置点击搜索按钮,或在搜索输入的文本框内键入回车时激活的对象
.setOnClearCallback(object, method)
设置点击清除按钮时,激活的对象
阅读笔记 Google Example Code:Custom Search Engines
地址:http://www.google.com/uds/samples/cse/index.html
This sample builds on the sample above by making heavy use of a product review custom search engine. Note the various calls to
结论:
通过cse类,同时设立了两个搜索结果框,以及最上边一个搜索输入框,和最下边一个视频搜索结果框
搜索输入框调用了searchForm控件
左右搜索结果框调用了searchControl控件,并预设了结果集大小,其中,右边同时设立了六个搜索引擎,采用标签的形式对结果分类
视频搜索结果框使用了GSvideoBar控件,可以同时实现视频搜索和选择结果播放的功能,需要在HTML页面中预设两个div用于分别显示搜索结果框和视频播放框
存疑:无
This sample builds on the sample above by making heavy use of a product review custom search engine. Note the various calls to
setSiteRestriction() all being made using a custom search engine id. The sample includes some other concepts that are not related to site restriction. These include the use of the GSearchForm object that is used to drive multiple search controls and the use of custom CSS directives that restyle portions of the search control and results.结论:
通过cse类,同时设立了两个搜索结果框,以及最上边一个搜索输入框,和最下边一个视频搜索结果框
搜索输入框调用了searchForm控件
左右搜索结果框调用了searchControl控件,并预设了结果集大小,其中,右边同时设立了六个搜索引擎,采用标签的形式对结果分类
视频搜索结果框使用了GSvideoBar控件,可以同时实现视频搜索和选择结果播放的功能,需要在HTML页面中预设两个div用于分别显示搜索结果框和视频播放框
存疑:无
阅读笔记 Google Example Code:Site Restricted Search
地址:http://www.google.com/uds/samples/apidocs/sitesearch.html
This sample demonstrates how to use the
结论:本例子在搜索中执行了限定站点搜索,并调用了定制的个性化搜索引擎,可以用这种方式在我们的搜索引擎中先搜索我们自己的站点,在通过调用我们定制的个性化搜索引擎实现我们想要的搜索功能。
存疑:为了什么每个搜索控件的结果都默认只返回一个搜索结果?虽然在搜索结果框中,每个搜索控件都对应了一个搜索结果框,并提供了选择按键,可以选择显示一个结果,多个结果和所有结果,但为什么默认只显示了一个结果?
可用注释:
google.load('search', '1');
//google.load(moduleName, moduleVersion, optionalSettings)该方法可以加载各个 AJAX API
//moduleName 是 API 的名称(例如 "maps" 或 "search")
//version 可以指定 API 模块的版本
//optionalSettings 可以为您作为 JavaScript 对象常量加载的 API 指定所有可选配置选项
Google AJAX Search API 可用参数
name: search
versions: 1
load request: google.load("search", "1");
supported options: callback, language, nocss
# callback: The function to call once the script has loaded. 后退控件
# language: The language in which to localize the API or API's UI controls. This is specified as a ISO639 language code. 语言设置
# nocss: A boolean that tells the API whether to load any style sheets typically associated with its controls. A developer might set this to false if he was completely overriding all of the loaded CSS and wanted to avoid the unnecessary load. 呈现样式
Eg.:google.load("maps", "2", {"language" : "ja_JP"});
Eg.:google.load("feeds", "1", {"nocss" : true});
This sample demonstrates how to use the
setSiteRestriction() method of the GwebSearch, GblogSearch, and GnewsSearch objects. When doing site restricted search, it is often a good idea to specify a customized label for the search result section header, and in some cases, perform some custom styling of the search results. Both of these functions are supported by using the setUserDefinedLabel() and setUserDefinedClassSuffix() methods. 结论:本例子在搜索中执行了限定站点搜索,并调用了定制的个性化搜索引擎,可以用这种方式在我们的搜索引擎中先搜索我们自己的站点,在通过调用我们定制的个性化搜索引擎实现我们想要的搜索功能。
存疑:为了什么每个搜索控件的结果都默认只返回一个搜索结果?虽然在搜索结果框中,每个搜索控件都对应了一个搜索结果框,并提供了选择按键,可以选择显示一个结果,多个结果和所有结果,但为什么默认只显示了一个结果?
可用注释:
google.load('search', '1');
//google.load(moduleName, moduleVersion, optionalSettings)该方法可以加载各个 AJAX API
//moduleName 是 API 的名称(例如 "maps" 或 "search")
//version 可以指定 API 模块的版本
//optionalSettings 可以为您作为 JavaScript 对象常量加载的 API 指定所有可选配置选项
Google AJAX Search API 可用参数
name: search
versions: 1
load request: google.load("search", "1");
supported options: callback, language, nocss
# callback: The function to call once the script has loaded. 后退控件
# language: The language in which to localize the API or API's UI controls. This is specified as a ISO639 language code. 语言设置
# nocss: A boolean that tells the API whether to load any style sheets typically associated with its controls. A developer might set this to false if he was completely overriding all of the loaded CSS and wanted to avoid the unnecessary load. 呈现样式
Eg.:google.load("maps", "2", {"language" : "ja_JP"});
Eg.:google.load("feeds", "1", {"nocss" : true});
订阅:
博文 (Atom)