日期:2014-05-17  浏览次数:20601 次

struts2在jsp页面,s:if 取得参数判断问题
操作是在用户列表页面删除一条记录,删除够跳转URL及参数传递如下:
http://127.0.0.1:8080/mycomm/user/index.action?type=remove
我在JS代码块里面写:
<s:if test='#request.type=="remove"'>
  alert("删除成功!");
</s:if>
为什么执行不了alert.
去掉双引号写成:
<s:if test='#request.type==remove'>
  alert("删除成功!");
</s:if>
则http://127.0.0.1:8080/mycomm/user/index.action,没type参数也会alert("删除成功!");。。。
大家这种跳转页面怎么写?

------解决方案--------------------
js里面能嵌套执行s:if?