• 数据绑定后细节处理


     <script type ="text/javascript">
            function getmouth(dt) {
                var mouth = "";
                switch (dt) {
                    case 1:
                        {
                            mouth = "Jan.";
                            break;
                        }
                    case 2:
                        {
                            mouth = "Feb.";
                            break;
                        };
                    case 3:
                        {
                            mouth = " Mar.";
                            break;
                        }
                    case 4:
                        {
                            mouth = "Apr.";
                            break;
                        }
                    case 5:
                        {
                            mouth = " May.";
                            break;
                        }
                    case 6:
                        {
                            mouth = "Jun.";
                            break;
                        }
                    case 7:
                        {
                            mouth = "Jul.";
                            break;
                        }
                    case 8:
                        {
                            mouth = "Aug.";
                            break;
                        }
                    case 9:
                        {
                            mouth = "Sept.";
                            break;
                        }
                    case 10:
                        {
                            mouth = " Oct. ";
                            break;
                        }
                    case 11:
                        {
                            mouth = " Nov.";
                            break;
                        }
                    case 12:
                        {
                            mouth = "Dec.";
                            break;
                        }
                }
                return mouth;
            }
        </script>

     <asp:Repeater runat="server" ID="rptnewsthree">         

                        <ItemTemplate>                      

               <li id="datatime" class="znew02" value="<%#string.Format("{0:MM}", Eval("UpdateTime"))%>">

                                        <script type="text/javascript">document.write(getmouth(<%#string.Format("{0:MM}", Eval("UpdateTime"))%>));</script>      

        <%# Eval("UpdateTime", "{0:dd}"+","+"{0:yyyy}")%>                           

          </li>                 

                    <li class="znew03"><a href="/news/newsinfo.aspx?nid=<%#Eval("ID") %>">         

                                <%# WebUtil.Substring(Eval("Title").ToString(), 60)%></a></li>     

                                <li class="znew04">               

                          <%#WebUtil.Substring(WebUtil.DelHTML(Eval("Content").ToString ()).ToString(), 100)%></li>   

                                  <li class="znew01"><a href="/news/newsinfo.aspx?nid=<%#Eval("ID") %>">阅读新闻</a></li>                             </ItemTemplate>         

                    </asp:Repeater>

  • 相关阅读:
    使用Apache的ab工具进行压力测试
    Effective Java开篇
    mysql删除同一表中重复字段记录
    正则表达式的元字符匹配
    几个学习git的地方
    创建和销毁对象
    遇到多个构造器参数时要考虑用构建器
    Java的类和接口
    转:流言粉碎机:每天对着电脑46小时的人必看
    页面选中文字弹出层,点击层中文字或者图片触发事件
  • 原文地址:https://www.cnblogs.com/ft-Pavilion/p/4482084.html
Copyright © 2020-2023  润新知