<s:select />标签参数详解
http://www.cnblogs.com/bmbm/archive/2011/12/21/2342253.html
单选框(男,女)
<th><em class="requireField">*</em><label>性别:</label></th>
<td>
<s:if test="crm.gender!=null&&crm.gender==0">
<label class="radio"><input name="gender" type="radio" value="1"/>男</label>
<label class="radio"><input name="gender" type="radio" value="0" checked="checked"/>女</label>
</s:if>
<s:else>
<label class="radio"><input name="gender" type="radio" checked="checked" value="1"/>男</label>
<label class="radio"><input name="gender" type="radio" value="0"/>女</label>
</s:else>
</td>
下拉框选择
<td>
<select id="personType">
<s:if test="crm.personType==1">
<option value="0">请选择</option>
<option value="1" selected="selected">一般客户</option>
<option value="2">VIP客户</option>
</s:if>
<s:elseif test="crm.personType==2">
<option value="0">请选择</option>
<option value="1">一般客户</option>
<option value="2" selected="selected">VIP客户</option>
</s:elseif>
<s:else>
<option value="0">请选择</option>
<option value="1">一般客户</option>
<option value="2">VIP客户</option>
</s:else>
</select>
</td>
当option的值很多时,这样写死一个一个判断无疑显得很囊肿。可以用<s:select />标签,参考这个博客
http://blog.csdn.net/q3498233/article/details/7057230
数字格式化(价钱)
<th><label>月收入:</label></th>
<td>
<input class="formText" type="text" id="receiveMoney" value='<fmt:formatNumber value="${crm.receiveMoney }" pattern="#,###.##"/>'
maxlength="10" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')"/>
</td>
备注
<th><label>备注:</label></th>
<td colspan="3">
<textarea class="formTextarea2 area area01" id="note" cols="124" rows="4" name=""
fmaxlength="1000">${crm.note}</textarea>
<span class="msg-text" style="float:right">0-1000字</span>
</td>