set value of a hidden field with name as an array in jQuery? - Javascript jQuery

Javascript examples for jQuery:Array

Description

set value of a hidden field with name as an array in jQuery?

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> 
   </head> 
   <body> 
      <input type="hidden" value="" name="name[]"> 
      <script type="text/javascript">
$('input[type="hidden"][name*="name"]').val('0');

      </script>  
   </body>/*from   w  ww  .ja  v  a  2s  .  c o m*/
</html>

Related Tutorials