jsp中根据参数类型动态拼接标签的class类
<%-- 判断是否是数字--%>
<c:set var="codeString" value="${gantryTarget.gantry.code}"/>
<%
String className = new String("dpTD_NUM");
String codeString = (String)pageContext.getAttribute("codeString");
try{
Double.valueOf(codeString);
}catch(Exception e){
className = new String("dpTD");
}
%>
<TD align='center' class="<%=className%>" >${codeString}</TD>