开发者

How can I get an absolute URL instead of a relative one? [closed]

开发者 https://www.devze.com 2023-03-30 12:06 出处:网络
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post.
Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 9 years ago.

Improve this question

I use this code to give my images link, but this code gives me a relative URL

MY Simplified 开发者_如何学GoCode :

<a href="www.google.com"><img src="/upload/banner.jpg" width="374" height="60"></a>

how can I give an exact link?


Use a protocol:

http://www.google.com/

The minimum required to make it domain-absolute is this:

//www.google.com/

which will use the same protocol as the current page (e.g. http or https).

0

精彩评论

暂无评论...
验证码 换一张
取 消