如何导航到谷歌图片搜索和wikiepdia搜索一个querry? [英] How to navigate to Google images search and wikiepdia search for a querry?

查看:292
本文介绍了如何导航到谷歌图片搜索和wikiepdia搜索一个querry?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在翻译程序中添加按钮,以便快速查找维基百科和谷歌图片。



我尝试过:



I need to add buttons in my translation program for fast Wikipedia and Google Images searches.

What I have tried:

void buttonPictures_Click(object sender, EventArgs e)
        {
            webBrowserMain.Navigate(


         "images.google.co.il//search?q="   +webBrowserMain.Document.GetElementById("source").GetAttribute("value")

            );
        }

        void buttonWikipedia_Click(object sender, EventArgs e)
        {
            webBrowserMain.Navigate(


         "en.wikipedia.org//w//query=" + webBrowserMain.Document.GetElementById("source").GetAttribute("value")

            );
        }

推荐答案

我想出来了:



I figured them out:

"google.com//search?site=&tbm=isch&q=" + query

"en.wikipedia.org//wiki//Special:Search?search=" + query


void buttonPictures_Click(object sender, EventArgs e)
        {
            webBrowserMain.Navigate(
                "www.google.co.in/search?                       q="+webBrowserMain.Document.GetElementById("source").GetAttribute("value")+"  &tbm=isch" 

            );
        }

        void buttonWikipedia_Click(object sender, EventArgs e)
        {
            webBrowserMain.Navigate(
                     "en.wikipedia.org/wiki/"
       + webBrowserMain.Document.GetElementById("source").GetAttribute("value")

            );
        }


这篇关于如何导航到谷歌图片搜索和wikiepdia搜索一个querry?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆