<select> <script type="text/javascript"> $.get( '/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> I want to make a select option but the select tags that I added before and after javascript code did not work. I want the result to be
<select><option value=n>n</option><option value=x>x</value></select>