< A HREF超链接是否需要" http:// ...。"? [英] Does <A HREF hyperlink require "http://..."?

查看:69
本文介绍了< A HREF超链接是否需要" http:// ...。"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否必须包含http://在一个HREF超链接中?

从一个人的链接页面删除它是否明智,只是为了保存代码?

Is it absolutely necessary to include "http://" in an A HREF hyperlink?
Would it be wise to remove this from one''s Links page, just to save code?

推荐答案

2006年1月4日星期三18:46:49 +0100,是啊< ye ** @ positive.net>写道:
On Wed, 04 Jan 2006 18:46:49 +0100, Yeah <ye**@positive.net> wrote:
是否必须包含http://在HREF超链接?


仅限http地址:


< URL:http://www.w3.org/Addressing/URL/5_BNF.html> ;

从一个人的链接页面删除它只是为了保存代码是明智的吗?
Is it absolutely necessary to include "http://" in an A HREF hyperlink?
Only for http addresses:

<URL:http://www.w3.org/Addressing/URL/5_BNF.html>
Would it be wise to remove this from one''s Links page, just to save code?




如果删除它,它不再是一个URL。这对我来说听起来并不明智。

-

, - - < - @ - PretLetters:''woest wyf '',遇见了vele interesses:----------。

|博客| http://home.wanadoo.nl/b。 de.zoete / _private / weblog.html |

| webontwerp | http://home.wanadoo.nl/b。 de.zoete / html / webontwerp.html |

| zweefvliegen | http://home.wanadoo.nl/b。 de.zoete / html / vliegen.html |

` --------------------------- ----------------------- - < - @ ------------''



If you remove it, it is no longer a URL. That doesn''t sound ''wise'' to me.
--
,-- --<--@ -- PretLetters: ''woest wyf'', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------''


是啊< ye ** @ positive.net>写道:
Yeah <ye**@positive.net> wrote:
是否必须包含http://在HREF超链接?


是的。

从一个人的链接页面删除它只是为了保存代码是明智的吗?
Is it absolutely necessary to include "http://" in an A HREF hyperlink?
Yes.
Would it be wise to remove this from one''s Links page, just to save code?




例如, http:// www的链接页面.htmlhelp.com / links / 可以使用

href =" http://www.example.com/"链接将参考
http://www.example.com/


但如果 http: //www.htmlhelp.com/links/ 使用

href =" www.example.com/"相反,该链接将参考
http:/ /www.htmlhelp.com/links/www.example.com/ 这不是一回事




参见 http://www.htmlhelp.com/faq/ html / bas ... l#relative-url

-

Darin McGrew, mc **** @ stanfordalumni.org http:/ /www.rahul.net/mcgrew/

网页设计组, da***@htmlhelp.com http://www.HTMLHelp.com/


Shin:一种在黑暗中寻找家具的装置。 - Steven Wright



As an example, the link page at http://www.htmlhelp.com/links/ could use
href="http://www.example.com/" and the link would refer to
http://www.example.com/

But if the link page at http://www.htmlhelp.com/links/ used
href="www.example.com/" instead, then the link would refer to
http://www.htmlhelp.com/links/www.example.com/ which is not the same thing
at all.

See also http://www.htmlhelp.com/faq/html/bas...l#relative-url
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"Shin: a device for finding furniture in the dark." - Steven Wright


Yeah写道:
Yeah wrote:
是否必须包含http://在一个HREF超链接中?
从一个人的链接页面删除它是否明智,只是为了保存代码?
Is it absolutely necessary to include "http://" in an A HREF hyperlink?
Would it be wise to remove this from one''s Links page, just to save code?




如果你不不包括协议,那么它是一个相对链接,所以如果你

有一个页面在 http://example.com/foo/index.html 和链接

href =" www.example.net"和href =" http://www.example.org"链接将是

到http://www.example.com/foo/www.example.net"和

" http://www.example.org"


-

David Dorward< http: //blog.dorward.me.uk/> < http://dorward.me.uk/>

首页是〜/ .bashrc的位置



If you don''t include the protocol, then it is a relative link, so if you
have a page at http://example.com/foo/index.html and links with
href="www.example.net" and href="http://www.example.org" the links would be
to "http://www.example.com/foo/www.example.net" and
"http://www.example.org".

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


这篇关于&lt; A HREF超链接是否需要&quot; http:// ...。&quot;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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