HTML Table 2
asp.net html 控件
html table 2
<script runat="server">
sub submit(sender as object, e as eventargs)
dim i,j
table1.bgcolor="yellow"
table1.bordercolor="red"
for i=0 to table1.rows.count-1
for j=0 to table1.rows(i).cells.count-1
table1.rows(i).cells(j).innerhtml="row " & i
next
next
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<table id="table1" border="1" runat="server">
<tr>
<td>cell 1</td>
<td>cell 2</td>
</tr>
<tr>
<td>cell 3</td>
<td>cell 4</td>
</tr>
</table>
<br>
<input type="button" value="change contents" onserverclick="submit" runat="server"/>
</form>
</body>
</html>
sub submit(sender as object, e as eventargs)
dim i,j
table1.bgcolor="yellow"
table1.bordercolor="red"
for i=0 to table1.rows.count-1
for j=0 to table1.rows(i).cells.count-1
table1.rows(i).cells(j).innerhtml="row " & i
next
next
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<table id="table1" border="1" runat="server">
<tr>
<td>cell 1</td>
<td>cell 2</td>
</tr>
<tr>
<td>cell 3</td>
<td>cell 4</td>
</tr>
</table>
<br>
<input type="button" value="change contents" onserverclick="submit" runat="server"/>
</form>
</body>
</html>
相关文章
- ASP.NET Web Pages Razor
- ASP.NET Web Pages 全局文件
- ASP.NET Web 的 C# 和 VB 实例
- ASP.NET Web Pages WebSecurity 参考手册
- ASP.NET MVC Web 应用程序
- ASP.NET MVC 页面和布局
- ASP.NET MVC 参考手册
- ASP.NET XML 数据绑定
- ASP.NET 数据库连接
- ASP.NET 导航
- ASP.NET 实例
- ASP.NET ImageButton 控件
- ASP.NET ListBox 控件
- ASP.NET Literal 控件
- ASP.NET PlaceHolder 控件
- ASP.NET BulletedList 控件
- ASP.NET TableCell 控件
- WebSecurity CreateAccount 方法
- WebSecurity Login 方法
- WebSecurity RequireRoles 方法