织梦仿站的时候,关于JS代码里面 图片路径
这是JS代码里面的图片路径,这是我要仿的站点JS代码varwidths=1440;varheights=350;varcounts=5;img1=newImage();i...
这是JS代码里面的图片路径, 这是我要仿的站点JS代码
var widths=1440;
var heights=350;
var counts=5;
img1=new Image ();img1.src='/skins/2009/images/banner01.jpg'
url1=new Image ();url1.src=''
img2=new Image ();img2.src='/skins/2009/images/banner02.jpg'
url2=new Image ();url2.src=''
img3=new Image ();img3.src='/skins/2009/images/banner03.jpg'
url3=new Image ();url3.src=''
img4=new Image ();img4.src='/skins/2009/images/banner04.jpg'
url4=new Image ();url4.src=''
img5=new Image ();img5.src='/skins/2009/images/banner05.jpg'
url5=new Image ();url5.src=''
var nn=1;
var key=0;
function change_img()
{if(key==0){key=1;}
else if(document.all)
{document.getElementById("pic").filters[0].Apply();document.getElementById("pic").filters[0].Play(duration=2);}
eval('document.getElementById("pic").src=img'+nn+'.src');
eval('document.getElementById("url").href=url'+nn+'.src');
for (var i=1;i<=counts;i++){document.getElementById("xxjdjj"+i).className='axx';}
我做的时候是这样替换的,但是替换后不显示
img1=new Image ();img1.src='{dede:global.cfg_templets_skin/}/images/banner01.jpg'
url1=new Image ();url1.src=''
img2=new Image ();img2.src='{dede:global.cfg_templets_skin/}/images/banner02.jpg'
url2=new Image ();url2.src=''
img3=new Image ();img3.src='{dede:global.cfg_templets_skin/}/images/banner03.jpg'
url3=new Image ();url3.src=''
img4=new Image ();img4.src='{dede:global.cfg_templets_skin/}/images/banner04.jpg'
替换后页面里显示不出来,请大神帮忙看看,错在哪,本人新手,跟到教程做的。 展开
var widths=1440;
var heights=350;
var counts=5;
img1=new Image ();img1.src='/skins/2009/images/banner01.jpg'
url1=new Image ();url1.src=''
img2=new Image ();img2.src='/skins/2009/images/banner02.jpg'
url2=new Image ();url2.src=''
img3=new Image ();img3.src='/skins/2009/images/banner03.jpg'
url3=new Image ();url3.src=''
img4=new Image ();img4.src='/skins/2009/images/banner04.jpg'
url4=new Image ();url4.src=''
img5=new Image ();img5.src='/skins/2009/images/banner05.jpg'
url5=new Image ();url5.src=''
var nn=1;
var key=0;
function change_img()
{if(key==0){key=1;}
else if(document.all)
{document.getElementById("pic").filters[0].Apply();document.getElementById("pic").filters[0].Play(duration=2);}
eval('document.getElementById("pic").src=img'+nn+'.src');
eval('document.getElementById("url").href=url'+nn+'.src');
for (var i=1;i<=counts;i++){document.getElementById("xxjdjj"+i).className='axx';}
我做的时候是这样替换的,但是替换后不显示
img1=new Image ();img1.src='{dede:global.cfg_templets_skin/}/images/banner01.jpg'
url1=new Image ();url1.src=''
img2=new Image ();img2.src='{dede:global.cfg_templets_skin/}/images/banner02.jpg'
url2=new Image ();url2.src=''
img3=new Image ();img3.src='{dede:global.cfg_templets_skin/}/images/banner03.jpg'
url3=new Image ();url3.src=''
img4=new Image ();img4.src='{dede:global.cfg_templets_skin/}/images/banner04.jpg'
替换后页面里显示不出来,请大神帮忙看看,错在哪,本人新手,跟到教程做的。 展开
2015-06-22
展开全部
如果只是修改图片路径导致不显示图片的话,那就应该是你的图片路径没放对,你可以试试用绝对路径看看网址/templets/default/images/banner02.jpg,不然就用相对路径,如/templets/default/images/banner02.jpg
追问
是不是在JS代码里面织梦标签{dede:global.cfg_templets_skin/}
不起作用啊
追答
目前看来应该是,你可以看源代码,是不是转换成正常路径,如果是,你再看看这个路径你能打开图片不
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询