1. 在中插入代码:
- <script language='javascript'>
- isns = navigator.appName == "Netscape";
- //定义播放图片张数
- img1=new Image()
- img2=new Image()
- img3=new Image()
- img4=new Image()
- img5=new Image()
- //图片路径、文件名
- img1.src='images/circul-side.gif'
- img2.src='images/css-manual.gif'
- img3.src='images/kpt7.jpg'
- img4.src='images/msn.jpg'
- img5.src='images/ps-logo.jpg'
- nn=1
- function change_img()
- {
- eval('document.pic.src=img'+nn+'.src');
- nn++;
- if(nn>5) nn=1
- if(!isns)
- {
- pic.filters.item(0).apply()
- pic.style.visibility='visible'
- pic.filters.item(0).play()
- setTimeout("pic.style.visibility='hidden'",4000);
- }
- else
- document.pic.visibility='visible'
- tt=setTimeout('change_img()',4000)
- }
- </script>
可以在代码中按照中文介绍,修改相关信息。
2. 在中加载
- <body onload="change_img();">
3. 插入第一张图片,并命名:id="pic"
插入代码:style='visibility:hidden;filter:revealtrans(duration=2.0,transition=12)'
参考图片代码:
- <img src="images/circul-side.gif" name="pic" width="120" height="90" id="pic" style='visibility:hidden;filter:revealtrans(duration=2.0,transition=12)'>
阅读(2728) | 评论(0) | 转发(0) |