修复部分情况下删除单选题题选项后,后面再添加的单选题与前面单选题name有重复的BUG

This commit is contained in:
sw 2015-01-15 13:58:50 +08:00
parent 496ef94b97
commit 517c3d1ca5
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@
//单选题
function add_single_answer(doc)
{
doc.parent().after("<li class='ur_item'><label>选项<span class='ur_index'></span></label><input type='text' name='question_answer["+(doc.parent().siblings("li").length + 1)+"]' placeholder='新建选项'/>" +
doc.parent().after("<li class='ur_item'><label>选项<span class='ur_index'></span></label><input type='text' name='question_answer["+new Date().getTime()+"]' placeholder='新建选项'/>" +
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a><a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>"+
"</li><div class='cl'></div>");
}