Javascript 补充html表中的池
我有html格式的表格要做Javascript 补充html表中的池,javascript,c#,html,css,asp.net-mvc,Javascript,C#,Html,Css,Asp.net Mvc,我有html格式的表格要做 <thead> ... </thead> <tbody> // tbody has 30 rows for 15 columns. </tbody> ... //tbody有30行15列。 在几列中,我必须插入字段 <input type = "time" name = "1st-row/1st-column"> <input type = "time" name = "2nd-row/1st-
<thead>
...
</thead>
<tbody>
// tbody has 30 rows for 15 columns.
</tbody>
...
//tbody有30行15列。
在几列中,我必须插入字段
<input type = "time" name = "1st-row/1st-column">
<input type = "time" name = "2nd-row/1st-column">
<input type = "time" name = "3rd-row/1st-column">
<input type = "time" name = "30th-row/1st-column">
- 相同的第2列/第3列/第5列+…+第十栏
我是否必须通过html直接在那里插入字段,是否可以更快更清晰地插入字段?如果是这样做的话?创建一个循环,使用document.createElement()创建元素,并使用element.appendChild()添加元素。
@对于(int i=0;i你想用Javascript还是Razor来做这件事?@panoskarajohn file extension.cshtml(Razor),我更喜欢razorWell,我知道人们已经回答过你了。如果你想要与他们已经提供的不同的东西,请详细说明你想要的行为。。
<table>
<thead>
</thead>
<tbody>
@for(int i=0;i<30;i++)
{
<tr>
@for(int y=0;y<15;y++)
{
<td>columns...</td>
}
</tr>
}
</tbody>
</table>