話題のショッピング
<div id="keyword"></div>
<script type="text/javascript">
//<![CDATA[
var keywords = [];
function doSearch(i) {
var gw = new GwebSearch();
gw.setResultSetSize(GSearch.LARGE_RESULTSET);
gw.setSiteRestriction("http://item.rakuten.co.jp/");
gw.setSearchCompleteCallback(null, function(){
for (j = 0; j < gw.results.length; j++) {
var url = gw.results[j].unescapedUrl;
var title = gw.results[j].title;
var titleNoFormat = gw.results[j].titleNoFormatting;
var span = document.createElement("span");
span.className = 'link';
var a = document.createElement("a");
a.appendChild(document.createTextNode(titleNoFormat.replace(/^【楽天市場】/, '')));
a.href = 'http://pt.afl.rakuten.co.jp/c/00bf792d.c3f3d474/?url=' + url;
a.title = titleNoFormat;
a.target = '_blank';
span.appendChild(a);
document.getElementById("result" + i).appendChild(span);
}
});
gw.execute(keywords[i]);
}
function showKeywords(res) {
for (var i = 0; i < res.keyword.length; i++) {
var rank = i + 1;
keywords.push(res.keyword[i]);
var id = 'result' + i;
var div = document.createElement("div");
div.className = "area";
var h4 = document.createElement("h4");
var a = document.createElement("a");
a.href = 'http://www.google.co.jp/search?q=' + encodeURIComponent(keywords[i]);
a.target = '_blank';
a.appendChild(document.createTextNode(keywords[i]));
div.appendChild(h4.appendChild(document.createTextNode(rank + '位: ')));
div.appendChild(a);
var link = document.createElement("div");
link.id = id;
div.appendChild(link);
document.getElementById("keyword").appendChild(div);
doSearch(i);
}
}
//]]>
</script>
<script type="text/javascript" src="http://fkoji.com/php/getGooKeyword.php"></script>
コメントを残す