Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/372.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使根目录页面中的图标同时出现在另一个目录中?_Javascript_Html_Mouseover - Fatal编程技术网

Javascript 如何使根目录页面中的图标同时出现在另一个目录中?

Javascript 如何使根目录页面中的图标同时出现在另一个目录中?,javascript,html,mouseover,Javascript,Html,Mouseover,在他们的程序员去世后,我继承了一位客户。他们有4个商业网站,运行的是我在谷歌上找到的Adobe Go Live代码 只要所有的.asp脚本和图像目录都不在web的根目录下,这种方法就可以正常工作。我需要将“存储”脚本移动到“存储”子目录下。当我运行根目录中的默认页面时,按钮中会出现图标。当我为asp位于“store”目录下的页面单击其中一个按钮时,这些按钮中再也没有图像了。我对Javascript一无所知。我相信,对于那些知道这一点的人来说,这是一个愚蠢的快速解决办法。任何帮助都将不胜感激 其他

在他们的程序员去世后,我继承了一位客户。他们有4个商业网站,运行的是我在谷歌上找到的Adobe Go Live代码

只要所有的.asp脚本和图像目录都不在web的根目录下,这种方法就可以正常工作。我需要将“存储”脚本移动到“存储”子目录下。当我运行根目录中的默认页面时,按钮中会出现图标。当我为asp位于“store”目录下的页面单击其中一个按钮时,这些按钮中再也没有图像了。我对Javascript一无所知。我相信,对于那些知道这一点的人来说,这是一个愚蠢的快速解决办法。任何帮助都将不胜感激

其他信息: 我已经将缺陷缩小到了需要更改图像所在目录的路径。如果我复制每个子目录下的images目录,它可以正常工作。我真的不希望系统上的每张图片都有4份副本

提前感谢,这里是部分示例源代码

<HEAD>
<script src="js_files/primary.js"></script>
<csactiondict>
<script><!--
CSInit[CSInit.length] = new Array    (CSILoad,/*CMP*/'button',/*URL*/'buttons/hp2.gif',/*URL*/'buttons/hp2.gif',/*URL*/'','Home     Page');
CSInit[CSInit.length] = new Array    (CSILoad,/*CMP*/'button2',/*URL*/'buttons/mv1.gif',/*URL*/'buttons/mv2.gif',/*URL*/'','But    ton2Text');
CSInit[CSInit.length] = new Array    (CSILoad,/*CMP*/'button3',/*URL*/'buttons/sev1.gif',/*URL*/'buttons/sev2.gif',/*URL*/'','B    uttons3sText');
// --></script>
</csactiondict>
</HEAD>

<BODY>

<csobj w="96" h="18" t="Button" st="Home Page" ht="buttons/hp2.gif">
<a href="#" onmouseover="return CSIShow(/*CMP*/'button',1)" onmouseout="return CSIShow    (/*CMP*/'button',0)" onclick="return CSButtonReturn()"><img     src="buttons/hp2.gif" width="96" height="18" name="button" border="0" alt="Home Page"></a>
</csobj>
<br>
<img height="2" width="108" src="images/spacer.gif" border="0" alt="Spacer">
<br>

<csobj w="96" h="18" t="Button" st="Button1Text" ht="buttons/hmc2.gif"><a     href="Link1.asp" onmouseover="return CSIShow(/*CMP*/'button35',1)" onmouseout="return     CSIShow(/*CMP*/'button35',0)" onclick="return CSButtonReturn()">
<img src="buttons/hmc1.gif" width="96" height="18" name="button3" border="0"     alt="Button3AltText"></a>
</csobj>
<br>

<img height="8" width="108" src="images/spacer.gif" border="0" alt="Spacer">
<br>
<csobj w="96" h="18" t="Button" st="Link2Text" ht="buttons/mv2.gif"><a     href="Link2.asp" onmouseover="return CSIShow(/*CMP*/'button2',1)" onmouseout="return     CSIShow(/*CMP*/'button2',0)" onclick="return CSButtonReturn()"><img src="buttons/mv1.gif"     width="96" height="18" name="button2" border="0" alt="Button2Text"></a></csobj>
</BODY>






如果将所有对
按钮/
的引用替换为
/buttons/
(在前面添加斜杠),则应适用于子目录中的页面

所以

将成为

CSInit[CSInit.length] = new Array    (CSILoad,/*CMP*/'button',/*URL*/'/buttons/hp2.gif',/*URL*/'/buttons/hp2.gif',/*URL*/'','Home     Page');
<img src="/buttons/hmc1.gif" width="96" height="18" name="button3" border="0"     alt="Button3AltText"></a>


将成为

CSInit[CSInit.length] = new Array    (CSILoad,/*CMP*/'button',/*URL*/'/buttons/hp2.gif',/*URL*/'/buttons/hp2.gif',/*URL*/'','Home     Page');
<img src="/buttons/hmc1.gif" width="96" height="18" name="button3" border="0"     alt="Button3AltText"></a>

等等。您只需要主机根目录中的一个
按钮


您的编辑器应该有一种“全部替换”的方法,以减少应用这些更改的痛苦。

如果您用
/buttons/
替换对
/buttons/
的所有引用(在前面添加斜线),它应该适用于子目录中的页面

所以

将成为

CSInit[CSInit.length] = new Array    (CSILoad,/*CMP*/'button',/*URL*/'/buttons/hp2.gif',/*URL*/'/buttons/hp2.gif',/*URL*/'','Home     Page');
<img src="/buttons/hmc1.gif" width="96" height="18" name="button3" border="0"     alt="Button3AltText"></a>


将成为

CSInit[CSInit.length] = new Array    (CSILoad,/*CMP*/'button',/*URL*/'/buttons/hp2.gif',/*URL*/'/buttons/hp2.gif',/*URL*/'','Home     Page');
<img src="/buttons/hmc1.gif" width="96" height="18" name="button3" border="0"     alt="Button3AltText"></a>

等等。您只需要主机根目录中的一个
按钮


您的编辑器应该有一种“全部替换”的方法,以减少应用这些更改的痛苦。

这样做运气不好。。。使用CSS重写滚动比修复滚动更容易吗?-1这需要一个更具描述性的标题。我正试图想出一个,但不能,因为这篇文章基本上说“我不知道问题出在哪里,来帮我解决吧。”我同意这个标题需要改进,我不得不承认我不能太快地提取一个。运气不好。。。使用CSS重写滚动比修复滚动更容易吗?-1这需要一个更具描述性的标题。我正试图想出一个,但不能,因为这篇文章基本上说“我不知道问题出在哪里,来帮我解决吧。”我同意这个标题需要改进,我不得不承认我不能太快地提取一个。