标签:
=====================html
<table>
<tr>
<td style="Width: 100px; text-align: right;"><span class="sp">借款产品:</span></td>
<td id="checlboxlist">
</td>
</tr>
</table>
===============================jq代码
function initLoaneeProduct()
{
$.ajax({
type : "post",
url : "./externalSources/XXXX/XXX.gxtweb",
//data : {},
success : function(result) {
var listHtml="";
for(var i = 0;i<result.length;i++){
// alert(result[i].id+","+result[i].name);
listHtml += " <span class=‘spbox‘><input type=‘checkbox‘";
listHtml += "name=‘category‘";
listHtml += " id=cr0"+i;
listHtml += " value="+result[i].id;
listHtml += " style=border:none;/>";
listHtml += ""+result[i].name;
listHtml += "</span>";
}
$("#checlboxlist").html(listHtml).css("text-align","left");
}
});
}
标签:
原文地址:http://www.cnblogs.com/yangjinwang/p/5778698.html