HTML page containing a GET request
All,
I have to manually create an HTML page. The story behind it is not that interesting... But in case on wonders. I want to change a GET request's parameters, for google, to enforce safe search. So I have http://www.google.com/search?hl=en&source=hp&biw=1422&bih=755&q=blabla&aq=f&aqi=g10&aql=&oq=
to
http://w开发者_如何学Goww.google.com/search?hl=en&source=hp&biw=1422&bih=755&q=blabla&aq=f&aqi=g10&aql=&oq=&safe=strict
I have to create an HTML page with the modified get parameters. What would that HTML string look like?
Thanks Reza
Try
<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>
Most of the parameters are unnecessary, but here is a form, containing a search field, that will produce the search query you want
精彩评论