Amazon web services 在HTMLQuestion中使用javascript代码

Amazon web services 在HTMLQuestion中使用javascript代码,amazon-web-services,mechanicalturk,Amazon Web Services,Mechanicalturk,我在HTMLQuestion表单中使用javascript代码来验证用户输入 <HTMLQuestion xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2011-11-11/HTMLQuestion.xsd" > <HTMLContent> <![CDATA[ <!DOCTYPE html> <html> <head>

我在HTMLQuestion表单中使用javascript代码来验证用户输入

<HTMLQuestion  xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2011-11-11/HTMLQuestion.xsd" >
<HTMLContent>
 <![CDATA[
<!DOCTYPE html> 
<html>
 <head> 
  <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  <script language = "javascript"  type='text/javascript' >
      $(document).ready(function()
      {
          alert("iFrame is ready");
      });
  </script>

$(文档).ready(函数()
{
警报(“iFrame已准备就绪”);
});

遗憾的是,我没有让javascript代码正常工作。我试着跟踪html代码,结果发现每次命中都会像IFrame一样受阻。看起来Amazon Mechanical Turk不允许嵌入javascript代码

两个选项:(1)允许使用javascript,但跨域脚本可能是问题所在;(2) 在您自己的服务器上使用ExternalQuestion和host来避免此问题。有两个选项:(1)允许使用Javascript,但跨域脚本可能是问题所在;(2) 在您自己的服务器上使用ExternalQuestion和host来避免此问题。