<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Hello World - Google AJAX Search API Sample</title>
<style>
#searchcontrol .gs-result .gs-webResult { width : 1024px; }
#searchcontrol .gs-webResult .gs-title { width : 1024px; }
#searchcontrol a.gs-title, a.gs-title * { color : red; }
#searchcontrol .gs-webResult .gs-snippet { width : 1024px; }
</style>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script language="Javascript" type="text/javascript">
google.load('search', '1');
function OnLoad() {
// Create a search control
var searchControl = new google.search.SearchControl();
var webSearch= new google.search.WebSearch()
webSearch.setUserDefinedLabel("javaeye:");
webSearch.setSiteRestriction("iteye.com");
searchControl.addSearcher(webSearch);
// Set the Local Search center point
var drawOptions = new google.search.DrawOptions();
// tell the searcher to draw itself in linear mode
drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED);
// tell the searcher to draw itself and tell it where to attach
searchControl.draw(document.getElementById("searchcontrol"),drawOptions);
// execute an inital search
}
google.setOnLoadCallback(OnLoad);
</script>
</head>
<body>
<div id="searchcontrol">
</div>
</body>
</html>