2010-01-22 33 views
1

./CoverFlows_files/coverflow.js是什么意思?任何人都可以指向一个链接,描述了什么样的网址(点)是什么意思?

我明白../CoverFlows_files/coverflow.js手段[​​上升一个目录] 而/CoverFlows_files/coverflow.js手段[​​从这里走下来]

也就是有办法去根像在asp.net其~/ ...?

我没有其他的事情很明白是哪里放

<link rel="stylesheet" type="text/css" href="CoverFlows_files/coverflow.css"> 

<SCRIPT type="text/javascript" src="./CoverFlows_files/coverflow.js"></SCRIPT> 

做这两个标记在头部或身体去或者它没有关系?

我想如果任何人有一个链接到一个网页,超越这些基本主题,这将是非常有用的。

问候 PQ

回答

2

路径不是在“web的仅用于环境“,所以我会尽力解释它,但进一步。 (我将使用语法如下:where we are + what path we type = what's the absolute path

  • ./path/to/file搜索仅在本字典:
    • /home/crozin + ./path/to/file = /home/crozin/path/to/file
    • http://blah.com/support/ + ./path/to/file = http://blah.com/support/path/to/file
  • /path/to/file是绝对路径:
    • /home/crozin + /path/to/file = /path/to/file
    • http://blah.com/support/ + /path/to/file = http://blah.com/path/to/file
  • path/to/file在每个目录中搜索从include_path(OS变量)。因此,如果include_path设置为:.;/home/crozin;/tmp然后它会在搜索:
    • /home/crozin + path/to/file = ./path/to/file/home/crozin/path/to/file/tmp/path/to/file
    • http://blah.com/support/ + path/to/file = http://blah.com/support/path/to/file(如第一示例基本相同)

...: url(...)总是使用绝对路径。在“网络环境”中,这是最简单的风格。

4

./意味着当前目录

CoverFlows_files/coverflow.css./CoverFlows_files/coverflow.css基本上相同

/CoverFlows_files/coverflow.css是从域名绝对路径

对于实施例http://yoursite.com/CoverFlows_files/coverflow.css相同/CoverFlows_files/coverflow.css

关于样式表和脚本,你可以把它放在任何地方

但好的做法,以加快您的网站是

Put Stylesheets at the Top

Put Scripts at the Bottom

相关问题