开发者

referencing a url like src="//www.example.com/blah.js"

开发者 https://www.devze.com 2023-02-09 07:53 出处:网络
I\'ve seen references for images and .js files like: src=\"//www.example.com...\" is this a technique so it works in both http and htt开发者_StackOverflow社区ps?yes. If you leave off the protocol,

I've seen references for images and .js files like:

src="//www.example.com..."

is this a technique so it works in both http and htt开发者_StackOverflow社区ps?


yes. If you leave off the protocol, most modern browsers will use whatever is being used by the current page.

0

精彩评论

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