我正在使用一个简单的图像滑块脚本。它适用于大多数浏览器。简单的图像滑块Javascript图像路径不工作在IE 6
当我使用默认图像在IE6中测试它时,它工作正常:给图像加载的默认路径是一些像这样的网址somesitename.com/image.jpg
;这适用于IE 6和其他现代浏览器。
但是,当我添加我的图像像someimages.jpg
它不会加载IE6中的图像,而在其他浏览器中它工作正常。
是我的JavaScript首先支持一些URL路径,然后是图像路径?
下面的代码就是我编辑图像路径的一部分...
<script type="text/javascript">
var mygallery=new simpleGallery({
wrapperid: "simplegallery1", //ID of main gallery container,
dimensions: [300,250], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
imagearray: [
["images/img-2.jpg", "#", "_new", "There's nothing like a nice swim in the Summer."],
["images/img-1.jpg", "#", "", ""],
["images/r-.jpg", "", "", "Eat your fruits, it's good for you!"],
["images/inside-image1.jpg", "", "", ""]
],
autoplay: [true, 2500, 5], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
oninit:function(){ //event that fires when gallery has initialized/ ready to run
//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
},
onslide:function(curslide, i){ //event that fires after each slide is shown
//Keyword "this": references current gallery instance
//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
}
})
</script>
引用:“...在IE6和其他现代浏览器中工作...” - 嗯... IE6,一个现代浏览器?我想不是。 – Spudley 2012-07-21 21:40:29