修复部分情况下删除单选题题选项后,后面再添加的单选题与前面单选题name有重复的BUG
This commit is contained in:
parent
496ef94b97
commit
517c3d1ca5
|
@ -16,7 +16,7 @@
|
||||||
//单选题
|
//单选题
|
||||||
function add_single_answer(doc)
|
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>"+
|
"<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>");
|
"</li><div class='cl'></div>");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue