0
私は自分のアプリケーションにJQueryとcakephpを使用しています。使い方JQueryの使い方
I have created a select input Element using
$(document).ready(function(){
$("#"+<?=$r['Attribute']['id'];?>).each(function() {
type= "<?=$r['Attribute']['type'];?>";
attribute_id= "<?=$r['Attribute']['id'];?>";
if(type=="dropdown")
{
var ht = $.ajax({
type: "GET",
url: "http://localhost/FormBuilder/index.php/forms/viewChoices/"
+ attribute_id,
async: false
}).responseText;
var myObject = eval('(' + ht + ')');
var data = myObject;var j=0;
$.map(data.choices, function(i){ j++; alert(i.choice);
$('<option value='+i.choice+'>'+i.choice+'</option>')
.appendTo("#"+<?=$r['Attribute']['id'];?>);
return i.choice;});
}
});
});
などで作成したもの,,値が私を提案してください...私はそこにある知っている
<option value="Below 5 Yrs">Below 5 Yrs</option>
のように設定されていない理由を私は知らない
<select id="10" name="Experience">
<option value="Fresher">Fresher</option>
<option yrs="" 5="" value="Below">Below 5 Yrs</option>
<option yrs="" 10="" value="Above">Above 10 yrs</option>
</select>
引用符のいくつかの問題と私は多くのオプションを試しました...
としてそれを見て生の出力)? – TheVillageIdiot