zoukankan      html  css  js  c++  java
  • 数据绑定后细节处理

     <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>

  • 相关阅读:
    CVS 快速入门指南
    我的博客皮肤
    OOP三个基本特征
    vi 操作
    智者能堪破这世界的定数,但没人能逃脱劫数
    技术路径的四阶段
    python每日学习2018/1/14(python之禅)
    python每日学习2018/1/11
    Python PyInstaller安装和使用教程(详解版)
    Windows环境下安装MinGW/gcc
  • 原文地址:https://www.cnblogs.com/ft-Pavilion/p/4482084.html
Copyright © 2011-2022 走看看