オブジェクトの配列化


 TextBoxを配列化する。

<% int idx = 0; %>
<c:forEach var="i" begin="0" end="23" varStatus="loopIndex">
  <html:text name="myForm" property='<%= "txt[" + idx + "]" %>' />
  <% idx++; %>
</c:forEach>

 配列化したTextBoxの値をJavaScriptで取得する。
data = myForm/elements['txt[0]'].value;

 Loopしながら取得。
for(icnt = 0 ; icnt < 5 ; icnt++){
  data = myForm.elements['txt[' + icnt + ']'].value;
}

このページへのコメント

kVY5HC Really informative blog.Thanks Again. Great.

0
Posted by check it out 2014年01月23日(木) 11:06:05 返信

IXc0pY Major thanks for the article post.Much thanks again. Great.

0
Posted by tips about seo 2013年12月20日(金) 03:50:15 返信

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

Wiki内検索

管理人/副管理人のみ編集できます