滚动条

滚动条实现:

 <marquee direction="left" scrolldelay="150" onMouseOut="this.start()" onMouseOver="this.stop()"><%=GetNotices() %></marquee>

 public string GetNotices()

        {

            string result = "";

            Notice notice = new Notice();

            DataSet ds = notice.FindNoticeDisplay(5);

            if (ds.Tables[0].Rows.Count > 0)

            {

                foreach (DataRow dr in ds.Tables[0].Rows)

                {

                    string id = dr["PKID"].ToString();

                    string title = dr["Title"].ToString();

                    string temp = "<a target='_blank' href='/Purview/LookNotice.aspx?cid=" + id + "' ><font color=#ff0000><strong>" + title + "</strong></font></a>    ";

                    result += temp;

                }

            }

            return result;

        }

这些都是博主多年积累的,有些可能是别人的,但博主已经不记得来自哪里了,就不特殊标出了,望见谅!!!!
原文地址:https://www.cnblogs.com/objectxhy/p/5896027.html