How to pass parameters to javascript function within a struts tag?
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})"/>
精彩评论