从您的地址栏搜索网页 [英] Search the web from the adress bar

查看:149
本文介绍了从您的地址栏搜索网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的web浏览器我当然有一个地址栏,但我只能搜寻网址的地址栏,如facebook.com的东西。我希望我的地址栏,以便能够像一个搜索引擎来工作,所以当我输入像www.facebook.com我会去facebook.com,当我搜索,如Facebook,没有www或者.com或东西,我想我的地址栏我重定向到 https://www.google.se/?gws_rd=ssl #q = Facebook的如果你知道我的意思。谢谢!

on my WebBrowser I have a address bar of course, but I can only search urls in the address bar, like "facebook.com" and something. I want my address field to be able to work like a search engine to, so when I type like www.facebook.com I will go to facebook.com and when I search like facebook, without www or .com or something I want my address bar to redirect me to https://www.google.se/?gws_rd=ssl#q=facebook if you know what I mean. Thanks!

推荐答案

您可以尝试使用此功能:

You can try using this function::

Private Function CheckURL(ByVal UrlText As String)
    Dim URL As New Uri(UrlText)
    Dim Req As System.Net.WebRequest
    Req = System.Net.WebRequest.Create(URL)
    Dim Resp As System.Net.WebResponse

    Try
        Resp = Req.GetResponse()
        Resp.Close()
        Req = Nothing
        Return True
    Catch ex As Exception
        Req = Nothing
        Return False
    End Try
End Function

这篇关于从您的地址栏搜索网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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