Add a custom search engine to your own blog

zhaozj2021-02-12  206

Today, ISAAC's blog articles are seen on cnblog.org, and briefly describe how to add custom search engines on their own Blog. I am planning to do an attempt on this blog.

In addition to the method steps introduced by Isaac, there are still some questions to be aware, indicating it here.

1. First, go to Google to apply for search engines in the free station. Fill in the completion of its steps.

2, get the HTML search code given by Google, such as the

Google
% (domain) s % (domain) s

3, encoding problem, if the encoding of GB2312 needs to be added in the form: chedong Added, you can see here

4. Options >> Configuration in the block management interface >> Configuration Add to the above search engine form code. Trying, don't work. :). Because this blog system is ASP.NET, the entire page is a web form. The form, and Google also has a form to your code, FORM is not a nest.

5, transform Google gives you the code, remove the FORM label (don't forget the end of the tag too to get it), add the following one piece of script in the static news / declaration (must be added to Google's code) < Script language = "javascript"> Function ON_Search_Click () {form1.action = "http://www.google.com/custom/"; Form1.Target = "_blank"; Form1.Method = "get";} and then give the submit button (that is, the Google Search button) plus an OnClick event: οnclick = "JavaScript: on_search_click ()". Ok, when you click on the query, the FORM1 form is changed. 6. Modify the appearance of the interface of the query block. Because Google gives you the code may not be integrated into your page style, even because the text input box is too long, you will beat your LeftMenu. You need to make some modifications to these codes. Remove the unwanted pictures and change the length of the text box. In addition to those FORM objects, such as the elements such as Input and Button are not able to remove, other Google images and forms can be removed, you can also modify the style of the form object.

Now, your search engine can be used in your blog station. :)

Finally, my changes are as follows.

转载请注明原文地址:https://www.9cbs.com/read-6354.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.040, SQL: 9