开发者

How to call spring form:checkboxes component in javascript?

开发者 https://www.devze.com 2023-04-07 19:22 出处:网络
I am using spring form tags, want to call 开发者_开发百科 component in a javascript.This is how I solved my problem,

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

精彩评论

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

关注公众号