52,778
社区成员
发帖
与我相关
我的任务
分享
<select id="selectId"></select>
<script type="text/javascript">
var json = '{"20140501":"AAA","20140502":"BBB","20140503":"CCC"}';
var obj = JSON.parse(json);
var sel = document.getElementById("selectId");
for (var n in obj) {
var option = document.createElement("option");
option.value = n;
option.text = obj[n];
sel.appendChild(option)
}
</script>