问题描述
|
<html>
<head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>
<title>Alternate Results Location - Google AJAX Search API Sample</title>
<!-- Replace with http://www.google.com/jsapi -->
<script src=\"http://www.google.com/jsapi\" 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();
// web search,open,alternate root
var options = new google.search.SearcherOptions();
options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
options.setRoot(document.getElementById(\"somewhere_else\"));
searchControl.addSearcher(new google.search.WebSearch(),options);
searchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);
var options = new google.search.SearcherOptions();
options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
searchControl.addSearcher(new google.search.VideoSearch(),options);
// tell the searcher to draw itself and tell it where to attach
searchControl.draw(document.getElementById(\"search_control\"));
}
google.setOnLoadCallback(OnLoad);
//]]>
</script>
<style type=\"text/css\">
body {font-size:12px;}
table {position:relative;margin-left:auto;margin-right:auto;border:solid px grey;}
.top {padding-top: 75px;}
.gs-result {padding: 6px;border: solid 1px #DCDEE0;background-color: #EDEFF0;}
.gs-result:hover { border: solid 1px #B9C3C9;}
.gs-text-box {margin-top: 10%;}#search_control { margin: 20px; }
</style>
</head>
<body>
<table width=\"700px\">
<tr>
<td class=\"top\" valign=\"top\" width=\"400px\">
<div id=\"somewhere_else\">
Loading
</div>
</td>
<td valign=\"top\" width=\"300px\">
<div id=\"search_control\">
Loading...
</div>
</td>
</tr>
</table>
</body>
</html>
如果您在浏览器中查看此内容,则将鼠标悬停时会看到大块的边框会变暗。我想知道是否有一种方法可以使整个块可选,而不仅仅是该块的href。我认为CSS不能做到这一点,我认为JavaScript(最好是jquery)是做到这一点的方法。 (显然,我现在不知道如何。)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)