html:form表单发送get请求

请求百度:

<html>
<form action="https://www.baidu.com/s"  method="get">
<input type="text" name="wd" value="python" />
<input type="submit" name="submit" />
</form>
</html>

变量wd的value值就是搜索内容,即在百度内搜索python

 

请求必应:

<html>
<form action="https://cn.bing.com/search" method="get" >
<input type="text" name="q" value="html" />
<input type="submit" name="submit"/>
</form>
</html>

变量q的value值就是搜索内容,即在必应内搜索html

 

注:必应可以直接搜中文,百度不行,还没研究明白什么原因

       post同理,把method改成post

 

posted @ 2020-03-16 13:34  mghhz816  阅读(1310)  评论(0编辑  收藏  举报