Skip to content

Commit 0ee46a3

Browse files
wuwwuw
authored andcommitted
避免多选冲突,使用|分隔符
1 parent e67e704 commit 0ee46a3

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

dohomwork.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @param answerStr
2323
*/
2424
function doHomework(answerStr){
25-
var ans = answerStr.split(",");// 答案列表
25+
var ans = answerStr.split("|");// 答案列表
2626
var questionNode = $("#tblDataList>tbody");
2727
var rows = questionNode.rows;
2828

@@ -51,6 +51,6 @@ function doHomework(answerStr){
5151
}
5252

5353
// 做作业吧
54-
doHomework("D,B,B,B,C,C,B,C,B,D,A,D,D,C,A,B,B,B,A,D");
54+
doHomework("D|B|B|B|C|C|B|C|B|D|A|D|D|C|A|B|B|B|A|D");
5555

5656

homework.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ for(var i=0; i<rows.length; i++){
3333

3434
results.push(result);
3535
}
36-
console.log(results.join(","))
36+
console.log(results.join("|"))

0 commit comments

Comments
 (0)