我想与为我的数据库中的每条记录生成的单选按钮组进行交互。 我希望能够编辑每条记录并在保存之前更改单选按钮选择。 这是我的HTML代码
<script type="text/template" id="item-template">
<li class="<%= done ? 'completed' : '' %>">
<div class="view">
<label class="edit-shopname"><%= shopname %></label>
<label class="edit-shopadress"><%= shopadress %></label>
<label class="edit-shopsize"><%= shopsize %></label>
<button class="all-edit"></button>
<button class="todo-destroy"></button>
</div>
<div class="divedit">
<input class="edit" value="<%= shopname %>">
<input class="edit2" value="<%= shopadress %>">
<div class="radiobutton">
<input type="radio" name="edit_rbshopsize" value="small">Small
<input type="radio" name="edit_rbshopsize" value="medium">Medium
<input type="radio" name="edit_rbshopsize" value="large">Large
<label id="rbshopsize_var" style = "display:none;"><%= shopsize %></label>
</div>
<button class="save"></button>
</div>
</li>
</script>
同时打开2条记录进行编辑的示例 example of my app