不知道你要实现什么功能
也真看不出有什么效果
不过你下面这个是不对的
<script src="../images/produce/p1.html" type="SlideShow" width="399" height="148" border="0"></script>这个只能连接js文件
如果想要连接页面,你可以用框架
<iframe src="../images/produce/p1.html" type="SlideShow" width="399" height="148" border="0"></iframe>
也真看不出有什么效果
不过你下面这个是不对的
<script src="../images/produce/p1.html" type="SlideShow" width="399" height="148" border="0"></script>这个只能连接js文件
如果想要连接页面,你可以用框架
<iframe src="../images/produce/p1.html" type="SlideShow" width="399" height="148" border="0"></iframe>
引用:
<script src="../images/produce/p1.js"></script>P1js里面不要加<script></script>这个标记// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array belowPic[0] = '../images/produce/p1.html'
Pic[1] = '../images/produce/p2.html'
Pic[2] = '../images/produce/p3.html'
// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
alert(document.images);
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
Pic[0] = 'http://www.baidu.com'
Pic[1] = 'http://mp3.baidu.com'
Pic[2] = 'http://image.baidu.com'var t=0;function runSlideShow()
{
if (document.all)
{
document.all.SlideShow.src=Pic[t];
if(t>2)
t=0;
else
t++;
}
setTimeout('runSlideShow()', slideShowSpeed);
}
window.onload=runSlideShow;
</script><iframe src="" name="SlideShow" id="SlideShow" width="500" height="300" border="0"></iframe>
现在改在如下
<SCRIPT LANGUAGE="JavaScript">
var slideShowSpeed = 5000;
var t=0;var Pic = new Array();
Pic[0] = 'http://www.baidu.com'
Pic[1] = 'http://mp3.baidu.com'
Pic[2] = 'http://image.baidu.com'function runSlideShow()
{
document.all.SlideShow.src=Pic[t];
if(t>1)t=0;else t++;
setTimeout('runSlideShow()', slideShowSpeed);
}
window.onload=runSlideShow;
</script>
<iframe src="" name="SlideShow" id="SlideShow" width="500" height="300" border="0"></iframe>