Home >Web Front-end >HTML Tutorial >How to call a search engine on a page

How to call a search engine on a page

php中世界最好的语言
php中世界最好的语言Original
2018-02-06 09:44:393758browse

This time I will bring you how to call the search engine on the page and how to call the searchindex engine on the pageNotesWhat are they? Here are actual cases. Let’s take a look.

It suddenly occurred to me today that it would be cool to call powerful search engines like Google and Baidu on your own pages.
So I checked the information online, and I didn’t expect that it was just a few lines of code.
The following is a code segment that calls Baidu:

<!--在页面中调用百度引擎--> 
<!doctype html> 
<html> 
<head> 
<meta charset="UTF-8"> 
<title>调用百度引擎</title> 
</head> 
<body> 
<div id="container"> 
<form action="http://www.baidu.com/baidu" target="_blank"> 
<div> 
<input name=tn type=hidden value=baidu> 
<a href="http://www.baidu.com/"> 
<img src="http://img.baidu.com/search/img/baidulogo_clarity_80_29.gif" alt="Baidu" border="0"></a> 
<input type=text name=word size=30> 
<input type="submit" value="百度搜索"></div> 
</form> 
</div> 
</body> 
</html>

How about it? It's simple enough, but I still wonder how difficult it is.

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to the php Chinese website Other related articles!

Related reading:

How to use form internal tags in html

Settings of textarea tags

How to solve the problem when the form automatically submits and jumps to other pages after pressing Enter in the webpage

How to set the default selection for the Select option in Html

How to optimize the HTML input box to improve user experience and ease of use

The above is the detailed content of How to call a search engine on a page. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn