本文介绍了添加链接的JavaScript图像阵列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些code这里的幻灯片,我需要添加链接,它是一个JavaScript图像阵列工作正常,但我不知道如何链接添加到每个图片。
我非常新手与JS。
VAR mygallery =新fadeSlideShow({ wrapperid:fadeshow1,//空白DIV的安置幻灯片页ID 尺寸:[200,235],//宽/像素画廊的高度。应该反映最大图像尺寸 imagearray: [images_ads / image1.jpg], [images_ads / image2.jpg], [images_ads / image3.jpg] ] DISPLAYMODE:{类型:'汽车',暂停:5000次:0,概括:假}, 坚持:假的,//最后记得同一个会话中观看幻灯片和回忆? fadeduration:1000,//转换时间(毫秒) descreveal:按需 togglerid:})解决方案
据动态驱动器,图像阵列中的第二个关键应该是你的URL值和第三值是你想要的文字显示例如:
[images_ads / image1.jpg,www.stackoverflow,您的文字放在这里],I've got some code here for a slideshow that I need to add links to, it is a JavaScript image array that works fine but I am not sure how to add links to each picture.
I'm very newbie with 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: "" })解决方案
According to Dynamic Drive, the second key in the image array should be your URL value and the third value is the text you want to display For instance:
["images_ads/image1.jpg", "www.stackoverflow", "Your text goes here"],
更多推荐
添加链接的JavaScript图像阵列
发布评论