• 12345图片滚动(动态读取后台数据)


     <div   class="boder">
                <script type="text/javascript">
                 var focus_width=450;
                 var focus_height=275;
                 var text_height=24;
                 var swf_height = focus_height+text_height;
                 var pics='<%=imgurl %>';
                 var texts='<%=imgtitle %>';
                 var links='<%=links %>';
                 document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
                 document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#f7fbff">');
                 document.write('<param name="menu" value="false"><param name="Loop" value="-1"><param name="wmode" value="opaque">');
                 document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
                 document.write('<embed src="focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#9ccfce" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
                 document.write('</object>');
                </script>
            </div>

    protected void Page_Load(object sender, EventArgs e)
        {
            BindImgData();
        }

        //绑定图片新闻
        public void BindImgData()
        {
            DataTable dt = new DataTable();
            dt = BLL.sen.GetImg(10, 6);//注意纳税服务图片ID
            string img = "";
            string text = "";
            string link = "";
            if (dt == null)
            {
                this.imgurl = "";
                this.links = "";
                this.imgtitle = "";
            }
            else
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    img += "|Files/images/" + dt.Rows[i]["url"].ToString();
                    text += "|" + dt.Rows[i]["title"].ToString();
                    link += "|" + "shownashuifuwuflashnews.aspx?id=" + dt.Rows[i]["id"];
                }
                this.imgurl = img.Substring(1, img.Length - 1);
                this.imgtitle = text.Substring(1, text.Length - 1);
                this.links = link.Substring(1, link.Length - 1);
            }
        }

  • 相关阅读:
    微信小程序音乐播放控制API在真机上貌似不可用?
    微信小程序request合法域名怎么配置啊
    微信小程序的路径是怎么计算的?
    微信小程序微信录音的silk格式文件怎么转MP3
    微信小程序全国巡回沙龙厦门站-尚琳凯演讲详细内容实录
    微信小程序全国巡回沙龙厦门站-A闪演讲详细内容实录
    微信小程序开发指南合集 各类组件用法技巧
    微信小程序常见问题及新手跳坑指南 每日更新 欢迎补充
    微信小程序沙龙回顾 附演讲实录及ppt
    laravel中的form表单提交
  • 原文地址:https://www.cnblogs.com/jcomet/p/1693630.html
Copyright © 2020-2023  润新知