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>
  • 相关阅读:
    mongodb安装
    node版本的管理 n
    npm 命令
    nodejs,npm安装(ubuntu14.04下)
    yeoman,grunt,bower安装(ubuntu14.04)
    什么是堆和栈,它们在哪儿?
    malloc函数详解 (与new对比)
    单链表的C++实现(采用模板类)
    短信验证码
    webapi
  • 原文地址:https://www.cnblogs.com/zecVip/p/5826344.html
Copyright © 2011-2022 走看看