欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

遍历json

程序员文章站 2022-07-12 15:46:29
...
<script language="javascript">
function e()
{
var json=[{"kl_id":"2","kl_title":"Test date","kl_content":"Test date","kl_type":"1","id":"1"},{"kl_id":"2","kl_title":"Test","kl_content":"Test","kl_type":"1","id":"2"}]
var str = "";
for (var one in json)
{
for(var key in json[one])
{
str += json[one][key]+ ",";
}
}
document.form.txtName.value = str;
}
</script>
相关标签: json JavaScript

上一篇: json 遍历

下一篇: 理解JSON