嗨 我有一个表,我想通过 C# 向其中添加动态行...我该怎么做...提前谢谢
最佳答案
您可以通过 javascript 在 html 表格中添加新行
<asp:Button ID="btnTest" runat="server" Text="Check" OnClientClick="javascript:return AddRow();"/>
<script type="text/javascript" >
var mytable = document.getElementById('mytableID');
function AddRow() {
var row = document.createElement('tr');
mytable.appendChild(row);
return false;
}
</script>
关于c# - 如何在 C# 中向表中添加动态行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4085385/