<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="jquery-3.2.0.min.js"></script>
</head>
<body>
<table id="tab" border="1">
<tr></tr>
</table>
<script>
var data = [{hehe:"1",layer:"呵呵3",hehe1:"weqwe322qeqe"},
{hehe:"2",layer:"呵呵3",hehe1:"weqweqee33qe"},
{hehe:"3",layer:"呵呵242343",hehe1:"weqweqee33qe"},
{hehe:"4",layer:"呵呵3234",hehe1:"weqweqee33qe"},
{hehe:"5",layer:"呵呵323",hehe1:"weqweqee33qe"},
{hehe:"6",layer:"呵呵323",hehe1:"weqweqee33qe"},
{hehe:"7",layer:"呵呵323",hehe1:"weqweqee33qe"},
{hehe:"8",layer:"呵呵323",hehe1:"weqweqee33qe"},
{hehe:"9",layer:"呵呵312323",hehe1:"weqweqee33qe"},
{hehe:"10",layer:"呵呵312323",hehe1:"weqweqee33qe"},
{hehe:"11",layer:"呵呵312323",hehe1:"weqweqee33qe"},
{hehe:"12",layer:"呵呵312323",hehe1:"weqweqee33qe"},
{hehe:"13",layer:"呵呵323",hehe1:"weqweqee33qe"},
{hehe:"14",layer:"呵呵321323",hehe1:"weqweqee33qe"},
{hehe:"15",layer:"呵呵4",hehe1:"weqweqedsqe"}];
$(function() {
for (var i = 0; i < data.length; i++) {
if(i%2==1){
var sb = '<tr>' +
'<td>' +(i+1)+ '</td>' +
'<td>' + data[i].hehe + '</td>' +
'<td>' + data[i].layer + '</td>' +
'<td>' + data[i].hehe1 + '</td>' +
'</tr>';
$('#tab').append(sb);
}
}
});
</script>
</body>
</html>