可能重复:
Is it valid to replace with // in a <script src=“…”>?
Absolute URLs omitting the protocol (scheme) in order to preserve the one of the current page
Does using //www.example.com in Javascript chose http/https protocol automatically//,而不是协议://
我期待在从Facebook一些示例代码,我看到:
<script src="//connect.facebook.net/en_US/all.js"></script>
他们使用//
而不是http://
- 这是什么花式,我不知道呢?
我发誓这是一个非常着名的极端投票问题的副本,但我明白如果你搜索并找不到原来的问题,因为我也不能。 – BoltClock
这篇文章回答了这个问题http:// stackoverflow .com/questions/3583103/scheme-relative-urls,但是如果你不知道搜索* scheme的相对URL *,你不会找到它 –
@BoltClock我知道你正在谈论的确切问题,但我也找不到它。 –