NET设计规范:.NET约定、惯用法与模式 --------------------------------------------------树形控件------------------------------------------------ <td id="tdTree" class="treetblleft" style="width: 150px"> <div id="divMenu" class="treetblleftbox" style="width: 150px; overflow: auto"> <asp:TreeView ID="tvSpecial" runat="server" OnSelectedNodeChanged="TvSpecial_NodeChage" OnTreeNodeExpanded="tvSpecial_TreeNodeExpanded" ExpandDepth="1"> <Nodes> <asp:TreeNode Text="系统" Value="" SelectAction="Select"></asp:TreeNode> </Nodes> </asp:TreeView> </div> </td> --------------------------------------------------横线设置------------------------------------------------ <td style="border: none; border-bottom: Black 1px solid;"> NO.<asp:Label ID="lblTicketNo" runat="server" Text="" ></asp:Label> </td> <td style="border: none;" align="right"> 编号: </td> <td style="width: 160px;border-bottom: Black 1px solid;" align="left"> <asp:Label ID="lblTicketNumber" runat="server" Text="" ></asp:Label> </td> -Style="border: none; border-bottom: Black 1px solid;" -----------------------------------------textbox多行文本横线显示-------------------------------------------- textarea { background: url(../../App_Themes/default/images/textboxline.gif) top repeat; line-height: 20px; border: none; overflow:auto;word-wrap: normal;overflow-x: scroll; } --------------------------------------------菜单点击高亮显示-------------------------------------------------- <ul class="tabbertitle"> <li id="one1" class="tabbertitlethis"><a href="#">标准票信息</a></li> <li id="one2"><a id="Auditinglink" href="<%="ShowAuditingInfo.aspx?&TicketID=" + hdfWorkTicketID.Value %>"> 审核记录</a></li> </ul> <ul class="tabbertitle"> <li id="one1" ><span><a id="ticketLink" runat="server">标准票信息</a></span></li> <li id="one2" class="tabbertitlethis"><span><a id="Auditinglink" href="#">审核记录</a></span></li> </ul> <table cellpadding="0" cellspacing="0" class="fixminilayout"> <tr> <td> <div> <DtscCommonControl:SmartGridView ID="smtFlowView" runat="server" CssClass="gridview" Width="100%" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" MapTree=""> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:BoundField DataField="RoleName" HeaderText="操作角色" > <ItemStyle Width="280px" /> </asp:BoundField> <asp:BoundField DataField="Step" HeaderText="操作步骤" ItemStyle-Width="200px" > <ItemStyle Width="200px"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="OperateContent" HeaderText="操作内容" ItemStyle-Width="250px" ItemStyle-HorizontalAlign="Left" > <ItemStyle HorizontalAlign="Left" Width="250px"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="OperateTime" HeaderText="操作时间" > <ItemStyle Width="250px"></ItemStyle> </asp:BoundField> </Columns> <OptionTree IsTree="False" OpenImg="" ShutImg="" LeafImg="" LastOpenImg="" LastShutImg="" LastLeafImg="" VertLineImg="" BlankImg="" HeadRowCount="1" Collapse="False" DeepNode="2" ColumnIndex="0" Striped="False" HighLight="False" State="False"></OptionTree> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <HeaderStyle Wrap="False" BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#2461BF" /> <EmptyDataTemplate> <cc1:EmptyData ID="EmptyData1" runat="server" /> </EmptyDataTemplate> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#EFF3FB" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <SortedAscendingCellStyle BackColor="#F5F7FB" /> <SortedAscendingHeaderStyle BackColor="#6D95E1" /> <SortedDescendingCellStyle BackColor="#E9EBEF" /> <SortedDescendingHeaderStyle BackColor="#4870BE" /> </DtscCommonControl:SmartGridView> </div> </td> </tr> </table> -------------------------------------------------------按钮固定-------------------------------------------------- <asp:Content ID="Content2" ContentPlaceHolderID="ButtonContent" runat="Server"> </asp:Content> <input type="button" class="button" value="关 闭" onclick="javascript:window.parent.close();" /> ----------------------------------------------------滚动条横隐藏竖显示---------------------------------------- html,body{ overflow-x: hidden; overflow-y: auto; } -----------------------------------------------------滚动条字段显示-------------------------------------------- <html> <head> <style type="text/css"> div { width:80px; height:150px; overflow: scroll } </style> </head> <body> <p>如果元素中的内容超出了给定的宽度和高度属性,overflow 属性可以确定是否显示滚动条等行为。</p> <div> 这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要,用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也会出现滚动条。默认值是 visible。 这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要,用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也会出现滚动条。默认值是 visible。 这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要,用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也会出现滚动条。默认值是 visible。 这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要,用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也会出现滚动条。默认值是 visible。 </div> </body> ----------------------------------------js取值---------------------------------------------------------------------------- <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <input type="text" id="s" value="sp" /> <script type="text/javascript"> var t_sp = document.getElementById("s").value; alert(t_sp); </script> </body> </html>