简体   繁体   中英

how to use javascript variable in struts2 param tag

我想在属性文件中使用当前年份值,应该使用带有new Date().getFullYear()值的<s:param>标记作为参数将其发送到<s:text>标记。

我已经尝试过,正确的语法是:

<s:property value="%{new java.util.Date().fullYear}" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM