JavaSCript选择 $获取( 'http://www.ufilme.ro/api/load/maron_online/470', 函数(数据){ var mydata=新数组(); var i=0;// $('name',data).each(函数(){ if($(this).text()=='MATERIAL_ID')mydata[i++]=new Array();// mydata[i-1][$(this.text()]=$(this.next().text(); }); var htm=''; 对于(我的数据中的i)htm+=“” +mydata[i]['TITLE']+'; $('#real').html(htm); }, “xml” );

JavaSCript选择 $获取( 'http://www.ufilme.ro/api/load/maron_online/470', 函数(数据){ var mydata=新数组(); var i=0;// $('name',data).each(函数(){ if($(this).text()=='MATERIAL_ID')mydata[i++]=new Array();// mydata[i-1][$(this.text()]=$(this.next().text(); }); var htm=''; 对于(我的数据中的i)htm+=“” +mydata[i]['TITLE']+'; $('#real').html(htm); }, “xml” );,javascript,jquery,html,select,Javascript,Jquery,Html,Select,好的,问题1现在解决了,我想让它像一个选择。。我添加了,但它没有任何效果,因为它不是有效的语法,特别是选项值,但是+'缺少引号 <select> <script type="text/javascript"> $.get( 'http://www.ufilme.ro/api/load/maron_online/470', function(data){ var mydata

好的,问题1现在解决了,我想让它像一个选择。。我添加了,但它没有任何效果,因为它不是有效的语法,特别是
选项值,但是
+'
缺少引号

     <select>
<script type="text/javascript">     
    $.get(     
      'http://www.ufilme.ro/api/load/maron_online/470',     
      function(data){     
        var mydata = new Array();     
        var i = 0; // индекс массива материалов
        $('name', data).each(function(){     
          if($(this).text()=='MATERIAL_ID') mydata[i++] = new Array(); // массив материалов
          mydata[i-1][$(this).text()] = $(this).next().text();     
        });
        var htm = '';
      for(i in mydata) htm += "<option value=\"" + mydata[i]['TITLE'] + "\">"
    + mydata[i]['TITLE'] + "</option>";
        $('#real').html(htm);
      },     
      'xml'     
    );
</script>
</select> 
htm+=“”
+mydata[i]['TITLE']+';

这是因为它不是有效的语法,特别是
选项值
,而且
+''
缺少引号

     <select>
<script type="text/javascript">     
    $.get(     
      'http://www.ufilme.ro/api/load/maron_online/470',     
      function(data){     
        var mydata = new Array();     
        var i = 0; // индекс массива материалов
        $('name', data).each(function(){     
          if($(this).text()=='MATERIAL_ID') mydata[i++] = new Array(); // массив материалов
          mydata[i-1][$(this).text()] = $(this).next().text();     
        });
        var htm = '';
      for(i in mydata) htm += "<option value=\"" + mydata[i]['TITLE'] + "\">"
    + mydata[i]['TITLE'] + "</option>";
        $('#real').html(htm);
      },     
      'xml'     
    );
</script>
</select> 
htm+=“”
+mydata[i]['TITLE']+';

你的报价都是混合的,请不要忘记在使用框架时提及你的框架。你的报价都是混合的,请不要忘记在使用框架时提及你的框架。很酷,现在它工作了,我有一个问题,我在javascript前后添加了
标记,但没有任何效果,你有什么效果吗其他ideas@VicToRSava .. 看起来你没有在你的DOMi编辑的主帖子中添加它,所以我希望它看起来像
options..
,我在javascript代码之前和之后添加了select标记。。但是它不起作用很酷它现在起作用了我有一个问题我在javascript前后添加了
标记但没有任何效果你还有其他的吗ideas@VicToRSava .. 看起来你没有在你的DOMi编辑的主帖子中添加它,所以我希望它看起来像
options..
,我在javascript代码之前和之后添加了select标记。。但它不起作用