getting model attribute from javascript

1.2k views Asked by At

i'm going to send fileVO(java bean) to my js file. how to get this value from js?

model attribute from java.

   model.addAttribute("fileVO", fileVOListTmp.get(0));

and I need to get this value in javascript.

<script>
        var fileVO = $('#fileVO').val();
        alert(fileVO);

</script>

but it shows undefined

0

There are 0 answers