English 中文(简体)
与外部档案的联系不可行
原标题:link to external .js file does not work
  • 时间:2012-05-11 12:14:56
  •  标签:
  • javascript

我很奇怪,我的档案存放在虚拟服务器上(USB Webserver V8.2)。 如今,当服务器上台时,这页就没有发生。 我知道它与连接路标有关的事情,但我尝试以多种不同的方式改变这一联系,但没有任何东西。

<script type="text/javascript" src="/root/help_page_code.js"></script>
问题回答

这张rel=“nofollow”>relative path,因此服务器正在网页夹中寻找一个名为root的名录。

如果你试图从该网页上翻开一个目录,则只制作。 如果您继续工作并能够进入,则每一级仅增加<条码>。

引文:

<script type="text/javascript" src="./root/help_page_code.js"></script>
  • Open you page in google chrome. Hit the F12 key to opene the developer menu.
  • In the first tab (Elements), look if your script file is in the head of your html
  • In the second tab (Resources) look for the script and hover over its name. Then you ll see the actual path that is used to find your script

如果这是与服务器上的实际途径相同的话,请说明。

如果文字和网页都相同,你可以选择:

<script type="text/javascript" src="help_page_code.js"></script>




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.