日期:2014-05-19  浏览次数:20700 次

求助,jsp页面<s:if test="">中 取当前页面<s:textfield >标签的value进行比较 在线等,谢谢
<s:textfield name="cshonour.cshonourId" id="cshonourId"/></td>
textfield的value是通过js赋值的,确实存在,在网页上也显示出来了。
怎么样才能把 textfield标签的value 取出来在 <s:if test="">的test中进行比较。谢谢
<s:if test="#attr.cshonour.cshonourId==0">

------解决方案--------------------
应该不能吧、

你的struts标签是服务器端的代码 你js的客户端的代码

而你js赋值的代码 服务器端是查不到的、

或者你可以使用ajax 把js赋值的东西取到来跟service里的方法比较。