你用onclick事件相应你的javascript代码不行么?我觉得完全可以。如果你非要加一个属性你可要修改很多东西。
比如:struts-html.tld文件中加入像这样的代码:
<tag>
<name>dateType</name>
<tagclass>org.apache.struts.taglib.html.DateTypeTag</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>input</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
</tag>
然后你还要做一个处理用的类:
用struts的SRC新建工程
org.apache.struts.taglib.html.DateTypeTag
…………