日期:2014-05-16  浏览次数:20466 次

一个很急的JS问题
<SCRIPT language=JavaScript><!--var  
MainTopRoll = new xwzRollingImageTrans("IMG_MAIN_TOP_ROLL_DETAIL", "IMGS_MAIN_TOP_ROLL_THUMBNAIL");

MainTopRoll.addItem("http://www.e6home.com/cn/Product/index.aspx?ProductCataID=0&KeyWord=%C8%F0%C9%B0&x=7&y=8",
"images/01.jpg","img/a1.jpg","img/b1.jpg");

MainTopRoll.addItem("http://www.e6home.com/cn/Product/index.aspx?ProductCataID=0&KeyWord=%D0%C4%D0%E3&x=9&y=12",
"images/02.jpg","img/a2.jpg","img/b2.jpg");

MainTopRoll.addItem("http://www.e6home.com/cn/Product/index.aspx?ProductCataID=0&KeyWord=Sally+Hansen&x=9&y=3 ",
"images/03.jpg","img/a3.jpg","img/b3.jpg");

MainTopRoll.addItem("http://www.lanrentuku.com/",
"images/04.jpg","img/a4.jpg","img/b4.jpg");

MainTopRoll.addItem("http://www.lanrentuku.com/",
"images/05.jpg","img/a5.jpg","img/b5.jpg");

MainTopRoll.addItem("http://www.lanrentuku.com/",
"images/06.jpg","img/a6.jpg","img/b6.jpg");

MainTopRoll.Index = parseInt('0');MainTopRoll.install();//--></SCRIPT>

上面的代码中 MainTopRoll.addItem("http://www.e6home.com/cn/Product/index.aspx?ProductCataID=0&KeyWord=%D0%C4%D0%E3&x=9&y=12",
"images/02.jpg","img/a2.jpg","img/b2.jpg");里的链接地址打开是 直接从本窗口打开,要是我想链接地址从新窗口中打开怎么办?要加什么代码? JS我不是很懂,这个是从网上下下来的,自己改了些,现在就是这个从新窗口打开不知道怎么办。知道的赶紧告诉下 ,谢谢!!

------解决方案--------------------
<IMG style="CURSOR: hand"
onclick=MainTopRoll.alterImage(2)
src="img/a3.jpg" border=0
name=IMGS_MAIN_TOP_ROLL_THUMBNAIL>

把所有的MainTopRoll.alterImage()去掉。
然后给图片套上超链接。
试一试吧!