我正在使用一個簡單的圖像滑塊腳本。它適用於大多數瀏覽器。簡單的圖像滑塊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