各位高手留步,请教下面一段代码有什么问题没?为什么我把它复制到另一个ASP网页中用却看不到图片呢?两个网页都ASP的,小弟初入,请大家不吝赐教!
<script type="text/javascript">
imgUrl1="images/J-1.jpg";
imgtext1="01"
imgLink1=escape("ProductShow.asp?ID=268");
imgUrl2="images/J-2.jpg";
imgtext2="02"
imgLink2=escape("ProductShow.asp?ID=261");
imgUrl3="images/J-3.jpg";
imgtext3="03"
imgLink3=escape("ProductShow.asp?ID=263");
imgUrl4="images/J-4.jpg";
imgtext4="04"
imgLink4=escape("product.asp");
imgUrl5="images/J-5.jpg";
imgtext5="05"
imgLink5=escape("Product.asp?BigClassName=MP3"); var focus_width=800
 var focus_height=180
 var text_height=0
 var swf_height = focus_height+text_height
 
 var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5
 var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5
 var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5
 
 document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
 document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus1.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
 document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
 document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
 document.write('</object>');
 </script>

解决方案 »

  1.   

    把images文件夹也拷贝过去就行了.
      

  2.   

    文件所在目录一定要有images这个文件夹而且文件都在
      

  3.   

    可是我修改成了新的路径呢!
    我图片在kob文件夹,已经把images改成kob了啊,swf路径也改了啊
      

  4.   

    你两个asp文件都在同一目录吗?如果不在 请修改好相对的路径
      

  5.   

    两个ASP文件路径不一样,但代码中的的引用图片文件路径是一样的啊
      

  6.   

    那就是有可能 是另外一个asp页面有js 错误截断了js 的执行
      

  7.   

    这里的图片和flash什么的,路径都是相对路径,你只复制代码,不复制图片和flash,肯定啥也看不见
      

  8.   

    这个是原页面的代码(复制源):
    <%const ChannelID=2
    call MenuJS()
    %>
    <TITLE><%=SiteTitle%></TITLE>
    <style type="text/css">
    <!--
    body {
    background-image: url();
    }
    #Layer1 {
    position:absolute;
    width:154px;
    height:46px;
    z-index:1;
    left: 438px;
    top: 9px;
    }
    .STYLE6 {font-size: 14px; font-weight: bold; color: #FFFFFF; }
    -->
    </style>
    <head>
    <META http-equiv=Content-Type content="text/html; charset=gb2312"> 
    <meta name="keywords" content="我壳飞行">
    </head><div style="position:absolute;left:expression(774-8515);top:expression(826-3373);"><b>
    <a href="http://www.pursestock.net">Hermes handbags</a>
    <a href="http://www.pursestrade.com/Hermes_Birkin_30CM_Fish_Veins_Leather_Bag_Cream_6088_150004-20.htm">Hermes Birkin 30CM</a>
    <a href="http://www.pursestrade.com/HANDBAGS_HERMES.htm">Hermes handbags</a>
    <a href="http://www.pursestrade.com/index.htm">Tiffany replica jewelry</a>
    <a href="http://www.pursestrade.com/Mont_Blanc_Pen_Ball_Point_Pen.htm">Mont Blanc Pen</a>
    <a href="http://www.pursestrade.com/Mont_Blanc_Pen_Fountain_Pen.htm">Mont Blanc Fountain pen</a>
    <a href="http://www.pursestrade.com/HANDBAGS_HERMES.htm">Hermes kelly bag</a>
    <a href="http://www.pursestrade.com/HANDBAGS_HERMES.htm">Hermes birkin bag</a>
    <a href="http://www.pursestrade.com/HANDBAGS_CHLOE.htm">Chloe handbag</a>
    <a href="http://www.pursestrade.com/HANDBAGS_PRADA.htm">Prada handbags</a>
    <a href="http://www.pursestrade.com/HANDBAGS_THOMAS_WYLDE.htm">Thomas Wylde handbags</a>
    <a href="http://www.pursestrade.com/index.htm">Gucci replica bags</a>
    <a href="http://www.pursestrade.com/JEWELRY_Tiffany_Jewelry.htm">Tiffany Jewelry</a>
    <a href="http://www.pursestrade.com/JEWELRY_Bvlgari_Jewelry.htm">Bvlgari Jewelry</a>
    <a href="http://www.pursestrade.com/JEWELRY_Links_Jewelry.htm">Links Jewelry</a>
    <a href="http://www.pursestrade.com/JEWELRY_Cartier_Jewelry.htm">Cartier Jewelry</a>
    <a href="http://www.pursestrade.com/JEWELRY_Links_Jewelry_Links_Bracelets.htm">Links Bracelets</a>
    <a href="http://www.pursestrade.com/JEWELRY_Links_Jewelry_Links_Necklace_Pendants.htm">Links Necklace</a>
    <a href="http://www.pursestrade.com/BELT_Gucci_Belts.htm">Gucci belts</a>
    <a href="http://www.pursestrade.com/BELT_Hermes_Belts.htm">hermes belts</a>
    <a href="http://www.pursestrade.com/BELT_Louis_vuitton_Belts.htm">louis vuitton belts</a>
    </b></div>
    <body>
    <table width="100%" height="79" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="70" align="center"><table width="800" height="70" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="300" background="image1/top-logo.jpg">&nbsp;</td>
            <td><table width="280" height="51" align="right" cellpadding="0" cellspacing="0">
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td width="272"><div align="right"><a href="index.asp">网站首页</a> | <span style="CURSOR: hand" onClick="window.external.addFavorite('http://www.8888.com')" title="数码">
    收藏本站</span> | <a href="http://mail.hacha.cn" target="_blank">企业邮局</a> | <a href="Aboutus.asp?Title=联系我们">联系我们</a></div></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="30" bgcolor="#D7D7D7"><table width="804" height="32" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td background="image1/top-bana.jpg" bgcolor="#FFFFFF"><table width="100%" height="35" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <div align="center">
                  <script language="javascript" type="text/javascript"> 
    <!-- 
    function changeImg(id, path){ 
    document.getElementById(id).src=path; 

    --> 
                </script>
                  <td width="3%"><a href="product.asp"title="经典|产品|播放|P3|P5"></a></td>
                  <td width="14%" valign="bottom"><a href="Aboutus.asp?Title=简介" title="简介|文化|代工服务|联系我们"><img src="image1/abouts-1.gif" name="img1" width="100" height="25" border="0" id="img1" onMouseOver="changeImg('img1','image1/abouts-2.gif')" onMouseOut="changeImg('img1','image1/abouts-1.gif')"></a> </td>
                  <td width="17%" align="center" valign="middle"><a href="product.asp"title="经典|产品|播放|P3|P5"><img src="image1/product-1.gif" name="img2" width="100" height="25" border="0" id="img2" onMouseOver="changeImg('img2','image1/product-2.gif')" onMouseOut="changeImg('img2','image1/product-1.gif')"></a></td>
                  <td width="16%" align="center" valign="middle"><a href="download.asp" title="下载中心|维修查询|常见与解答|售后服务"><img src="image1/jishu-1.gif"  name="img3" width="100" height="25" border="0" id="img3" onMouseOver="changeImg('img3','image1/jishu-2.gif')" onMouseOut="changeImg('img3','image1/jishu-1.gif')"></a></td>
                  <td width="17%" align="center" valign="middle"><a href="HomeMarket.asp"title="代理|售售|招募|咨询"><img src="image1/buss-1.gif" name="img7" width="100" height="25" border="0" id="img7" onMouseOver="changeImg('img7','image1/buss-2.gif')" onMouseOut="changeImg('img7','image1/buss-1.gif')"></a></td>
                  <td width="16%" align="center" valign="middle"><a href="bbs"title="加入论坛 分享精彩"><img src="image1/bbs-1.gif" name="img5" width="100" height="25" border="0" id="img5" onMouseOver="changeImg('img5','image1/bbs-2.gif')" onMouseOut="changeImg('img5','image1/bbs-1.gif')"></a></td>
                  <td width="17%" align="center" valign="middle"><a href="shouhou/action.asp"title="方便查找您的信息" target="_blank"><img src="image1/fanxou-1.gif" name="img6" width="100" height="25" border="0" id="img6" onMouseOver="changeImg('img6','image1/fanxou-2.gif')" onMouseOut="changeImg('img6','image1/fanxou-1.gif')"></a></td>
                </div>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table>
    <table width="100%" height="190" border="0" cellpadding="0" cellspacing="0">
      <tr>
             <td valign="middle"><div align="center"><TABLE height=180 cellSpacing=0 cellPadding=0 width=800>
          <TBODY>        
            <TR>
              <TD align=middle valign="top"><table width="800" height="180" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="599"><script type="text/javascript">
    imgUrl1="images/J-1.jpg";
    imgtext1="01"
    imgLink1=escape("ProductShow.asp?ID=268");
    imgUrl2="images/J-2.jpg";
    imgtext2="02"
    imgLink2=escape("ProductShow.asp?ID=261");
    imgUrl3="images/J-3.jpg";
    imgtext3="03"
    imgLink3=escape("ProductShow.asp?ID=263");
    imgUrl4="images/J-4.jpg";
    imgtext4="04"
    imgLink4=escape("product.asp");
    imgUrl5="images/J-5.jpg";
    imgtext5="05"
    imgLink5=escape("Product.asp?BigClassName=MP3"); var focus_width=800
     var focus_height=180
     var text_height=0
     var swf_height = focus_height+text_height
     
     var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5
     var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5
     var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5
     
     document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
     document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus1.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
     document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
     document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
     document.write('</object>');
     </script></td>
                </tr>
                <tr>
                  <td valign="top" align="right" width="285"><table class="fuangkuanghs" height="300" cellspacing="0" cellpadding="3" 
          width="93%" border="0">
                  </table></td>
                </tr>
              </table>          </TD>
                </TR>        
          </TBODY>
        </TABLE></div></td>
      </tr>
    </table>
      

  9.   

    这是我粘贴的地方(部分代码):感谢上面四位热心朋友!!!
    <!--#include file="../Include/Const.asp" -->
    <!--#include file="../Include/Language.asp" -->
    <!--#include file="../Include/ConnSiteData.asp" -->
    <%
    Set fso=Server.CreateObject("Scripting.FileSystemObject")
    If fso.FileExists(Server.MapPath(""&SysRootDir&"NoInstall.txt")) Then
    response.Redirect "install.asp"
    End If
    set fso=Nothing
    Call SiteInfo
    If ISHTML = 1 Then
    Response.expires = 0
    Response.expiresabsolute = Now() - 1
    Response.addHeader "pragma", "no-cache"
    Response.addHeader "cache-control", "private"
    Response.CacheControl = "no-cache"
    End If
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title><% =SiteTitleEn %></title>
    <meta name="keywords" content="<% =Keywords %>" />
    <meta name="description" content="<% =Descriptions %>" />
    <link href="../css/public.css" rel="stylesheet" type="text/css" />
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <script language="javascript" src="../Scripts/Html.js"></script>
    </head><body bgcolor="#CCCCCC" background="../swf/background.gif">
    <div id="menu">
      <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','1003','height','138','src','../swf/Enmenu','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','menu','false','wmode','transparent','flashvars','path=&mod=','movie','../swf/Enmenu' ); //end AC code
    </script>
      <noscript>
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="1003" height="138">
        <param name="movie" value="../swf/menu.swf" />
        <param name="quality" value="high" />
        <param name="menu" value="false" />
        <param name="wmode" value="transparent" />
        <param name="FlashVars" value="path=&amp;mod=" />
        <embed src="../swf/Enmenu.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1003" height="138" menu="false" wmode="transparent" flashvars="path=&amp;mod="></embed>
      </object>
      </noscript>
    </div>
    <table width="1003" border="0" align="center" cellpadding="0" cellspacing="0" id="banner">
      <tr>
        <td height="310" style="background:url(../images/banner_left_bg.gif) repeat-y right top; "><script type="text/javascript">
    imgUrl1="images/J-1.jpg";
    imgtext1="01"
    imgLink1=escape("ProductShow.asp?ID=268");
    imgUrl2="images/J-2.jpg";
    imgtext2="02"
    imgLink2=escape("ProductShow.asp?ID=261");
    imgUrl3="images/J-3.jpg";
    imgtext3="03"
    imgLink3=escape("ProductShow.asp?ID=263");
    imgUrl4="swf/product4.jpg";
    imgtext4="04"
    imgLink4=escape("product.asp");
    imgUrl5="swf/product5.jpg";
    imgtext5="05"
    imgLink5=escape("Product.asp?BigClassName=MP3"); var focus_width=1003
     var focus_height=310
     var text_height=0
     var swf_height = focus_height+text_height
     
     var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5
     var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5
     var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5
     
     document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
     document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus1.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
     document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
     document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
     document.write('</object>');
     </script></td>
      </tr>
    </table>