FadeSlideShow - Javascript target =“_ blank”

时间:2012-10-01 08:08:49

标签: javascript show slide window.open

我的网站上有一张图片幻灯片,我想要在新窗口中打开链接...

<script type="text/javascript">

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [860, 500], //width/height of gallery in pixels. Should reflect dimensions        of largest image
imagearray:  [
    ["mil/aircrafthangar.jpg", "http://www.rubbmilitary.com/products/aircraft_hangars.html", "", "Rubb Military 20m Span EFASS Aircraft and Helicopter Hangar"],
    ["mil/helihangar.jpg", "http://www.rubbmilitary.com/products/helicopter_hangars.html", "", "Rubb Military 25m Span EFASS Aircraft and Helicopter Hangars"],
    ["mil/vehiclehangar.jpg", "http://www.rubbmilitary.com/products/small_aircraft_hangars.html", "", "Rubb Military 11m Span EFASS Vehicle and small Aircraft Hangars"],
    ["mil/sunshade.jpg", "http://www.rubbmilitary.com/products/aircraft_sunshades.html", "", "Rubb Military EFASS Sunshade Covering Aircraft and Helicopters"],
    ["mil/warehouse.jpg", "http://www.rubbmilitary.com/products/military_warehouse.html", "", "Rubb Military EFASS Mass Storage Warehouse"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 1000, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""

})

</script>

任何帮助或建议都会很棒。

谢谢你

1 个答案:

答案 0 :(得分:0)

图像数组的第三个参数可能是超链接的目标。试试这个。

["mil/aircrafthangar.jpg",
"http://www.rubbmilitary.com/products/aircraft_hangars.html",
"_blank",
"Rubb Military 20m Span EFASS Aircraft and Helicopter Hangar"]

你应该使用&#34; _blank&#34;对于阵列中的每个图像。

相关问题