开发者

How to pass parameters to javascript function within a struts tag?

开发者 https://www.devze.com 2022-12-20 07:45 出处:网络
something like this: <s:iterator value=\"list\" status=\"status\"> <s:textfield value=\"%{list_item}\" onchange=\"js_func(this开发者_Python百科, **status.index**)\"/>

something like this:

<s:iterator value="list" status="status">
  <s:textfield value="%{list_item}" onchange="js_func(this开发者_Python百科, **status.index**)"/>
<s:/iterator>

I wanna pass the index of status to js_func but fail to do that.

any suggestion?


Try this?

<s:textfield value="%{list_item}" onchange="js_func(this, %{status.index})"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号