包含GET请求的HTML页面
问题描述:
我必须手动创建HTML页面。它背后的故事并不是那么有趣......但在奇观的情况下。我想更改一个GET请求的参数,对于谷歌来执行安全搜索。所以,我有 http://www.google.com/search?hl=en&source=hp&biw=1422&bih=755&q=blabla&aq=f&aqi=g10&aql=&oq=
到
我要与修改后的GET参数创建一个HTML页面。 该HTML字符串会是什么样子?
感谢 礼
答
尝试
<html>
<head>
<title>Safe search</title>
</head>
<body>
<form action="http://google.com/search" method="get">
<input type="hidden" name="hl" value="en" />
<input type="hidden" name="source" value="hp" />
<input type="hidden" name="biw" value="1422" />
<input type="hidden" name="bih" value="755" />
<input type="text" name="q" />
<input type="hidden" name="aq" value="f" />
<input type="hidden" name="aqi" value="g10" />
<input type="hidden" name="aql" value="" />
<input type="hidden" name="oq" value="" />
<input type="hidden" name="safe" value="strict" />
</form>
</body>
</html>
大多数参数是不必要的,但这里是一个形式,包含搜索领域,将产生搜索查询想要
是什么HTML页面是否正确? – 2011-04-25 23:22:02
'strict'不是一个有效的值:http://www.google.com/cse/docs/resultsxml.html#safesp – 2011-04-25 23:25:12
页面通过设置safe = strict来强制搜索安全 – reza 2011-04-26 16:36:57