我在这里有一些代码需要添加链接的幻灯片,它是一个JavaScript图像数组,工作正常,但我不知道如何添加链接到每张图片。
我是JS的新手。
var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [200, 235], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["images_ads/image1.jpg"],
["images_ads/image2.jpg"],
["images_ads/image3.jpg"]
],
displaymode: {type:'auto', pause:5000, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 1000, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})
答案 0 :(得分:0)
根据Dynamic Drive,图像数组中的第二个键应该是您的URL值,第三个值是您要显示的文本 例如:
["images_ads/image1.jpg", "http://www.stackoverflow.com", "Your text goes here"],