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>

  • 相关阅读:
    Struts2使用json中要注意的几点
    JS实现关闭当前子窗口,刷新父窗口
    oracle中rownum效率低的原因以及解决办法
    URL传中文参数引发的乱码问题
    oracle存储过程
    Map.keyset() 使用详解
    oracle跨库查询dblink的用法
    Java中getResourceAsStream的用法
    如何删除存在多个重复记录中的一个
    cocos2d里面如何实现mvc系列
  • 原文地址:https://www.cnblogs.com/ft-Pavilion/p/4482084.html
Copyright © 2011-2022 走看看