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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM