[java]代码库
for(int i=0;i<questionList.size();i++){
sb.append("<input type=\"checkbox\" ");
String myId = questionList.get(i).getId();
System.out.print(myId);
sb.append("id =\""+questionList.get(i).getId()+"\" name=\"box\" value=\""+questionList.get(i).getId()+questionList.get(i).getQuestionTypeName()+"\"");
sb.append("/><label for=\""+myId+"\" style=\"display:inline-block;width:60px;\">");
sb.append(questionList.get(i).getQuestionTypeName());
System.out.print(questionList.get(i).getQuestionTypeName());
sb.append("</label>");
if((i+1)% 5==0)
{
sb.append("<br />");
sb.append("<br />");
}
else{
sb.append("<label style=\"display:inline-block;width:50px;\"></label>");
}
}//拼接builder里的
sb.append("<br />");
sb.append("<br />");
sb.append("<br />");
sb.append("<br />");
sb.append("<p style=\"width:300px;float:left;\"></p>");
sb.append("<input type=\"button\" name=\"button\" id=\"button\" onclick=\"hehe()\" value=\"绑定题型\" /> ");
}
String result = sb.toString();
JsonUtils.outJson(response, result);
document.getElementById("w").innerHTML = result;