zoukankan      html  css  js  c++  java
  • 图片轮播

    <div id="image" style="float: left; height: 256px; 334px;">
                            <% 
                              var dtpic =obj;//获取要轮播显示的图片列表
                              if (dtpic.Count != 0)
                              {
                                  int num = 0;//图片数量计数器
                                  int i = 0;//当前数据编号
                                  string imgUrl = "";
                                  string imgLink = "";
                                  string imgTitle = "";
                                  while (num < 6)
                                  {
                                      if (i == dtpic.Count)
                                      {
                                          num = 6;
                                      }
                                      else
                                      {
                                          string picUrl = dtpic[i].Imagesaddress.Trim();
                                          string picLink = "Module/OfficeAuxiliary/O_News_Show.aspx?id=" + dtpic[i].Id.Trim();
                                          string picTitle = dtpic[i].Title.Trim();
                                          if (!string.IsNullOrEmpty(picUrl))
                                          {
                                              if (picUrl.Split('.')[picUrl.Split('.').Length - 1].ToLower() == "jpg" || picUrl.Split('.')[picUrl.Split('.').Length - 1].ToLower() == "gif")
                                              {
                                                  imgUrl += picUrl + "|";
                                                  imgLink += picLink + "|";
                                                  imgTitle += picTitle + "|";
                                                  num++;
                                              }
                                          }
                                          i++;
                                      }
                                  }
                                  imgUrl = imgUrl.Substring(0, imgUrl.Length - 1);
                                  imgLink = imgLink.Substring(0, imgLink.Length - 1);
                                  imgTitle = imgTitle.Substring(0, imgTitle.Length - 1);
                                  Response.Write("<script type='text/javascript'>default_GetXml('" + imgUrl + "','" + imgLink + "','" + imgTitle + "','334','230','26','image')</script>");
                              }
                                %>
                        </div>
  • 相关阅读:
    js的BOM对象完全解析
    转:JavaScript中的this陷阱的最全收集
    转载:冷门js技巧
    MVVM的架构设计与团队协作 with StoryBoard
    ReactiveCocoa & FRP & MVVM
    ReactiveCocoa的冷信号与热信号 探讨
    Git本地项目上传 & SourceTree & GitHub 简单使用
    Monad / Functor / Applicative 浅析
    map & flatMap 浅析
    Swift -> Let & Var 背后编程模式 探讨
  • 原文地址:https://www.cnblogs.com/zecVip/p/5826344.html
Copyright © 2011-2022 走看看