开发者

How to call spring form:checkboxes component in javascript?

I am using spring form tags, want to call 开发者_开发百科 component in a javascript.


This is how I solved my problem,

var formElements = document.getElementById('form_id');
     for (var i = 0; i , formElements .length; i++)
       {
        if (formElements [i].type == 'checkbox')
          {
           formElements [i].disabled=true;             
          }
       }


It's rendered as regular hTML form so using Jquery you can access it as regular HTML form

<script type="text/javascript">
$(document).ready(function(){
  alert($("#compponentId").val());
      });
</script>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜