Quantcast
Channel: OKWAVE 閲覧数の多い質問(Java/253)【本日】
Viewing all articles
Browse latest Browse all 68675

strutsを使用したjspでjavascript関数へ引数を渡す方法

$
0
0
ご存知の方がおられましたら、教えてください。 struts1.2を使用したJSPで、ボタン押下時にjavascriptの関数に strutsの変数を渡したいのですが、呼ばれないようです。 固定の値を渡すと、きちんと呼ばれます。 下記に例を示します。 <html:html locale="true"> <script type="text/javascript"> function PointAdd(index) { alert('aaa'); } </script> <body> <logic:iterate id="gal" name="gals" type="model.Gal" offset="<%=(String)request.getAttribute("offset") %>" length="10" > <bean:define id="gal_no1" >  <bean:write name="gal" property="gal_no" /> </bean:define> <html:button property="noReAction" value="ポイントUP" onclick="PointAdd(<%= gal_no1 %>)" /> </logic:iterate> </body> </html:html> ご存知の方、おられましたら、 ご指導、よろしくお願いいたします。

Viewing all articles
Browse latest Browse all 68675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>