|
|
@@ -330,13 +330,18 @@ function bindEventTeaOrignalYS() {
|
|
|
var uHtml = document.createElement("u");
|
|
|
uHtml.className = "underlineContent no-answer";
|
|
|
uHtml.innerText = "暂无参考答案";
|
|
|
+ uHtml.setAttribute("data-text", uHtml.innerText);
|
|
|
+ //处理改错题及勾选题
|
|
|
if ($(parent)[0].tagName == 'P') {
|
|
|
if ($(parent).hasClass('correntQue') || $(parent).hasClass('boxQue')) {
|
|
|
uHtml.innerHTML = " ";
|
|
|
- uHtml.style = "width:" + randomNum(220, 300) + "px;";
|
|
|
+ //改错题,要随机下划线长度
|
|
|
+ if ($(parent).hasClass('correntQue')) {
|
|
|
+ uHtml.style = "width:" + randomNum(220, 300) + "px;";
|
|
|
+ }
|
|
|
+ uHtml.setAttribute("data-text", "");
|
|
|
}
|
|
|
}
|
|
|
- uHtml.setAttribute("data-text", uHtml.innerText);
|
|
|
$(spanHtml).html(uHtml.outerHTML);
|
|
|
$(item).after(spanHtml);
|
|
|
}
|
|
|
@@ -586,13 +591,18 @@ function bindEventYS() {
|
|
|
var uHtml = document.createElement("u");
|
|
|
uHtml.className = "underlineContent no-answer";
|
|
|
uHtml.innerText = "暂无参考答案";
|
|
|
+ uHtml.setAttribute("data-text", uHtml.innerText);
|
|
|
+ //处理改错题及勾选题
|
|
|
if ($(parent)[0].tagName == 'P') {
|
|
|
if ($(parent).hasClass('correntQue') || $(parent).hasClass('boxQue')) {
|
|
|
uHtml.innerHTML = " ";
|
|
|
- uHtml.style = "width:" + randomNum(220, 300) + "px;";
|
|
|
+ //改错题,要随机下划线长度
|
|
|
+ if ($(parent).hasClass('correntQue')) {
|
|
|
+ uHtml.style = "width:" + randomNum(220, 300) + "px;";
|
|
|
+ }
|
|
|
+ uHtml.setAttribute("data-text", "");
|
|
|
}
|
|
|
}
|
|
|
- uHtml.setAttribute("data-text", uHtml.innerText);
|
|
|
$(item).after(uHtml);
|
|
|
}
|
|
|
});
|
|
|
@@ -912,7 +922,10 @@ function handleAnswerRange() {
|
|
|
info.pId = answerId;
|
|
|
}
|
|
|
|
|
|
- info.AnsText = $(item).text();
|
|
|
+ info.AnsText = $(item).attr("data-text");
|
|
|
+ if (info.AnsText == undefined) {
|
|
|
+ info.AnsText = $(item).text();
|
|
|
+ }
|
|
|
tempJson.push(info);
|
|
|
|
|
|
var prev = $(item).prev();
|