![](/img/trans.png)
[英]javascript to change tabs using Amazon Mechanical Turk <crowd-tabs>
[英]Unexpected space under <form> using Mechanical Turk's crowd html elements
我对 Amazon MTurk 的 html 布局有一个奇怪的问题。 AWS 使用人群元素时, <form>
下出现意外空格。
这是一段演示代码:
<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>
<crowd-form answer-format="flatten-objects">
<div>
<form>
<p> Some random question</p>
<input type="radio" name="q-1" value="1"> <label>Choice1</label>
<br>
<input type="radio" name="q-1" value="2"> <label>Choice2</label>
<br>
<input type="radio" name="q-1" value="3"> <label>Choice3</label>
</form>
</div>
<p> Some random text to test the space after `form` </p>
</crowd-form>
这会产生一个带有大量空格的多项选择题(第二张图片直接在第一张图片之后 - 但由于空间太长,我必须截取两个单独的图片)。
但是,当注释掉人群 html 行时,一切似乎都很好:
<!--<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>-->
<crowd-form answer-format="flatten-objects">
<div>
<form>
<p> Some random question</p>
<input type="radio" name="q-1" value="1"> <label>Choice1</label>
<br>
<input type="radio" name="q-1" value="2"> <label>Choice2</label>
<br>
<input type="radio" name="q-1" value="3"> <label>Choice3</label>
</form>
</div>
<p> Some random text to test the space after `form` </p>
</crowd-form>
产生以下内容:
有谁知道为什么会发生这种情况,如果我仍然想使用人群表格,我该如何解决? 谢谢!
您应该省略<form>
元素。
<crowd-form>
为您处理所有表单提交。
您需要包含(不注释掉)Crowd HTML Elements 脚本导入:
<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>
希望这可以帮助。
如果您还有其他问题,请告诉我。
谢谢,
亚马逊机械土耳其人
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.