为什么运行以下代码时单选按钮的文本无法呈现:
<div id='sctices'></div>
var result = [
{"id":"G84","value":"Mman, J"},
{"id":"G95","value":"Ekara, G"},
{"id":"G98","value":"Gedala, PS"}
];
var key, count = 0;
for(key in result)
{
var btnId = result[key].id;
var btnValue = result[key].value;
var radio = $("<input></input>",
{
type: 'radio',
name: 'gtice',
class: 'radio-default',
checked: false,
value: btnValue,
id: btnId,
text: btnValue
});
//radio.text(btnValue);// did not work
radio.insertAfter("#sctices");
radio.wrap("<div></div>");
}
请帮忙。奇怪的是,文本出现在生成的源代码中。谢谢