标签属性 styleId
那么在struts中用property="sDate"
<html:text property="sDate" styleClass="dd_text"></html:text>它直接翻译
成html为:<input type="text" name="sDate" class="dd_text"/>里面没有id.
可以采用:
<html:text property="sDate" styleId="sDate" styleClass="dd_text"></html:text>
这样就达到了我们的要求了。这个小知识点希望对大家有所帮助。