可能重复:
shorthand as // for script and link tags? anyone see / use this before?
我想我明白发生了什么,但谷歌搜索时没有找到任何确定的内容。在这样的代码中:
// talking about the src attribute
<script type="text/javascript" src="//use.typekit.net/%kitid%.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
我习惯了http://在那里。当我在http服务器上调用此页面时,它会对资源进行常规HTTP请求,因此我假设这是http://的快捷方式。我猜这与不知道您所在的页面是否要使用https://或http://有关?是否有任何关于这种做法的文章或任何信息?