【发布时间】:2020-03-05 04:40:58
【问题描述】:
第一次使用 Mechanical Turk。这是我正在尝试做的模板:
<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>
<crowd-form id="form" answer-format="flatten-objects">
<p id="code"></p>
<crowd-input name="exit-code" placeholder="paste answer here" required></crowd-input>
</crowd-form>
<script>
// Reference to input .csv form
code_var = ${codes};
document.getElementById("code").innerHTML = code_var;
$("#form").submit( function(eventObj) {
$("<crowd-input />").attr("type", "hidden")
.attr("code", code_var)
.appendTo("#form");
return true;
});
</script>
我不希望发生的两件事:
- 代码未显示在
<p>标记中。如果我这样做<p id="code">${codes}</p>,那么它确实有效。 - 我想同时提交来自 ${codes} 的代码和表单提交时的退出代码。但我不知道该怎么做。
感谢您的任何提示或建议!
【问题讨论】:
标签: javascript html mechanicalturk