dojo的确是个不错的ajax框架,下面是一个dojo下的播放幻灯片效果图片的例子。

首先建立一个目录叫slidetest,然后再建立一个放图片的目录images,
然后把下载回来的dojo包解压缩,将其中的src,demos目录以及dojo.js放到
slidetest目录下
然后建立test.htm文件,代码如下
<html>
 <head>
  <title>Slideshow Widget Demo</title>
  
  <script type="text/javascript"> var djConfig = {isDebug: true}; </script>
  <script type="text/javascript" src="dojo.js"></script>
  <script language="JavaScript" type="text/javascript">
   dojo.require("dojo.widget.*");
   dojo.require("dojo.widget.SlideShow");
  </script>
  
  <style>
  html, body {
   height: 100%; width: 100%;
   overflow: hidden;
  }
  </style>
 </head>
 <body>
  <img dojoType="SlideShow"
   imgUrls="images/1.jpg;images/2.jpg;images/3.jpg;images/4.jpg;images/5.jpg;images/6.jpg"
   transitionInterval="700"
   delay="4000"
   src="images/1.jpg"
   imgWidth="400" imgHeight="300" />
 </body>
</html>

其中用到了dojo的widget工具包的slideshow类库,这个例子是静态的,
可以用动态的方法把数据库的图片读出来就可以了

相关文章:

  • 2022-02-22
  • 2021-11-17
  • 2022-12-23
  • 2021-09-21
  • 2022-12-23
  • 2022-03-09
  • 2022-12-23
  • 2021-11-02
猜你喜欢
  • 2021-06-12
  • 2021-08-24
  • 2021-11-17
  • 2021-04-14
  • 2021-11-17
  • 2021-11-24
  • 2022-12-23
相关资源
相似解决方案