日期:2014-05-18 浏览次数:20542 次
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="temp.aspx.cs" Inherits="aaaa_temp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>无标题页</title> <script> function change() { document.getElementById('<%= dl.ClientID%>').deleteRow(0); var tr=document.getElementById('<%= dl.ClientID%>').insertRow(0); var td ; var count = <%= tdCount %>; var content='<%= tdContent %>'; for(var i=0;i<count;i++) { td = tr.insertCell(i); td.innerHTML=content; } } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:DataList ID='dl' Width='100%' RepeatColumns="4" runat="server"> <HeaderTemplate> <table width="100%"><tr width="100%"><td width="40%">名称</td><td width="20%">单位</td><td width="20%">规格</td><td width="20%">数量</td></tr></table> </HeaderTemplate> <ItemTemplate> <table width="100%"><tr width="100%"><td width="40%"><%#Eval("Name") %></td><td width="20%"><%#Eval("Unit") %></td><td width="20%"><%#Eval("Standard")%></td><td width="20%"><%#Eval("Quantity")%></td></tr></table> </ItemTemplate> </asp:DataList> </div> </form> </body> </html>