Logo Araneae-online

Beispiel für eine XHTML Seite

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="de">
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>Suche &uuml;ber Google API</title>
<script src="http://www.google.com/jsapi?key=Ihr Google API Schlüssel" type="text/javascript"></script>
<script language="Javascript" type="text/javascript">
//<![CDATA[
google.load("search", "1");
function OnLoad() {
// Create a search control
var searchControl = new google.search.SearchControl();

// site restricted web search with custom label
// and class suffix
var siteSearch = new GwebSearch();
siteSearch.setUserDefinedLabel("ihre Domain");
siteSearch.setUserDefinedClassSuffix("siteSearch");
siteSearch.setSiteRestriction("ihre Domain");
searchControl.addSearcher(siteSearch);

// Tell the searcher to draw itself and tell it where to attach
searchControl.draw(document.getElementById("searchcontrol"));
// Execute an inital search
searchControl.execute("Google");
}
google.setOnLoadCallback(OnLoad);
//]]>
</script>
</head>
<body>
<div id="searchcontrol">Loading...</div>
</body>
</html>


Letzte Aktualisierung: Montag 19.10.2009